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.
In reply to Re: Regex Pipe Return
by roboticus
in thread Regex Pipe Return
by TapTapTaperoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |