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
In reply to regex clarification by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |