in reply to Perl pattern matching question
Read perlrequick, perlre,perlrecharclass
1.Read how to match a string. 2.Read How to group a matched stringEx,
my $str="a apple"; $str =~(s/a(\s+[aeiou].+)/an\1/g); print $str
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl pattern matching question
by Anonymous Monk on May 06, 2015 at 09:10 UTC |