Use ?: to forget the value of Some or This, which will make the regex a little bit more efficient.my @files=`ls Some_*zip This_*zip`; foreach (@files) { my ($day) = /(?:Some|This)_(\d+)/; .... }
In reply to Re: A better regex
by Roger
in thread A better regex
by williamp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |