iradik has asked for the wisdom of the Perl Monks concerning the following question:
i want to extract a.foobar from this string everytime it happens but i dont want the a.shoebar to be part of my extraction.$string = a.foobara.foobara.foobara.bara.foobar x 100
i match the string "a.bara.foobar". but i want a.bar (without a foo in front of bar) simply not to match! What is the proper re?@array = ($string =~ m/(a.*?foobar)/gso);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: repeating patterns
by Masem (Monsignor) on Mar 30, 2001 at 19:08 UTC | |
Re: repeating patterns
by Anonymous Monk on Mar 30, 2001 at 19:49 UTC | |
by arturo (Vicar) on Mar 30, 2001 at 20:15 UTC |