rummlerm has asked for the wisdom of the Perl Monks concerning the following question:
Would you please be so kind?!?!?!?$string = "hereiam[[[one]]] [[[two]]][[[three]]] wwhat "; # regex print "$string\n"; @strings = split / /, $string; foreach $result (@strings){ print "\"$result\"\n"; }
while ($string =~ /\[\[[(.*?)\]]\]/ig) { print "The pattern I care about is \"$1\"\n"; }
20070911 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl regex
by johngg (Canon) on Sep 06, 2007 at 09:33 UTC | |
|
Re: Perl regex
by Prof Vince (Friar) on Sep 06, 2007 at 10:38 UTC |