rtremaine has asked for the wisdom of the Perl Monks concerning the following question:
Perlmonks,
newbie having trouble with regular expression, I know it
should be easy but ..........
looking for the most efficient way to parse the following
types of input so that i can place then into the three
vars below. Thought 'split' might be the way to go but
having difficulties! Many thanks
just need last name, first name and middle initial, like so:' Smith, John' ' Thompson, Frank A' ' Smith, John A JR' ' Smith, John A III' ' Smith, John A (Johnny)'
$last_name = 'Smith' $first_name = 'John' $middle_initial = 'A'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Newbie parsing problem
by McDarren (Abbot) on Jan 25, 2007 at 16:52 UTC | |
Re: Newbie parsing problem
by liverpole (Monsignor) on Jan 25, 2007 at 16:11 UTC | |
Re: Newbie parsing problem
by vaticide (Scribe) on Jan 25, 2007 at 16:17 UTC | |
by mk. (Friar) on Jan 25, 2007 at 16:42 UTC | |
by vaticide (Scribe) on Jan 25, 2007 at 16:47 UTC | |
by rtremaine (Acolyte) on Jan 25, 2007 at 21:55 UTC | |
by mk. (Friar) on Jan 26, 2007 at 12:21 UTC | |
|
Back to
Seekers of Perl Wisdom