basic reg ex splitting a name into forename and surname
Posted on 2007-12-02
I don't know very much about regular expressions. How would i split a string input that represents a name into its forname and surname parts. I am assuming forenames cannot contain spaces for now so i would need to split the string into 2 parts based on the first space character in the string input. I then need each part of the regular expression in 2 separate variables. I think i would use the Match object for this but i dont know how to access the matched parts.