No such thing as a small change | |
PerlMonks |
Re^3: Global regexpby starbolin (Hermit) |
on Jun 17, 2008 at 16:31 UTC ( [id://692544]=note: print w/replies, xml ) | Need Help?? |
So, have the regex engine do what it does best, that is, return the longest matching string. Then, have a routine that takes that string and provides the permutations.
s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
In Section
Seekers of Perl Wisdom
|
|