|Welcome to the Monastery|
regex: seperating parts of non-formatted namesby emilford (Friar)
|on Sep 09, 2002 at 17:45 UTC||Need Help??|
emilford has asked for the
wisdom of the Perl Monks concerning the following question:
I am trying to write a script that will help out a fellow co-worker who has not yet been enlightened of the powers of perl. I already managed to impress when I took 5 minutes to write a script that ran for 30s, that saved her at least an hour of work. She has a database full of names that follow no specific format, that she needs to seperate down to
Some might have all this information, some might not.
I know that this is feasible with a fairly complex regex, which is where I'm running into some problems. I'm sure I could put something together that would work fairly well, but I want to try and write code that will perform appropriately for all cases.
To show that I'm not just asking you guys to solve my problem, I have come up with some ideas that I think need to be incorporated into the regex.
I'd want to be able to seperate this into:
(< > marks chunk tossed into variable)
I'm going to start working on this regex and toy around with different ideas. I'll post what I have completed every so often, but any feedback, ideas, suggestions, code would be appreciated.
Thanks in advance,