Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
How to match only "by MRCUS ELN AP","AP, Ctina Appe","John Ap Smith" and not "Application Specialist"#!/usr/bin/perl use strict; use warnings; my @names; @names = ("by MRCUS ELN AP","AP, Ctina Appe","John Ap Smith","Applicat +ion Specialist"); foreach my $name (@names){ $name =~ m/AP/i; print "$name\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: match the name
by Your Mother (Archbishop) on Nov 04, 2009 at 05:21 UTC | |
|
Re: match the name
by davido (Cardinal) on Nov 04, 2009 at 05:21 UTC | |
|
Re: match the name
by ikegami (Patriarch) on Nov 04, 2009 at 06:15 UTC | |
|
Re: match the name
by happy.barney (Friar) on Nov 04, 2009 at 13:42 UTC |