Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
For the following input i am getting output as shown below. But what i expected was, Jackie, what is the reason for this.
Input:
David Veterinarian Jackie Orthopedist Karen Veterinarian
while (<>) { push(@array, $&) if m/^\w+(?!\s+Vet)/; } print("@array\n");
ouptut:Davi Jackie Kare
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex clarification
by Enlil (Parson) on Mar 05, 2005 at 10:33 UTC | |
|
Re: regex clarification
by gopalr (Priest) on Mar 05, 2005 at 11:15 UTC | |
|
Re: regex clarification
by Thelonious (Scribe) on Mar 05, 2005 at 10:52 UTC | |
by tphyahoo (Vicar) on Mar 05, 2005 at 11:55 UTC | |
|
Re: regex clarification
by holli (Abbot) on Mar 05, 2005 at 13:03 UTC | |
|
Re: regex clarification
by TedPride (Priest) on Mar 05, 2005 at 19:16 UTC |