http://www.perlmonks.org?node_id=1010435


in reply to Regex Pipe Return

TapTapTaperoo:

Sure ... use a character class (or non-capturing grouping). Something like:

my $string = 'xxxxxxabxxx'; print $1 if $string = /(x*[ab][ab]x*)/;

should work.

...roboticus

When your only tool is a hammer, all problems look like your thumb.