What have you tried? How did it fail? What specific detail are you having trouble with? See I know what I mean. Why don't you?. As a starting point you may find it helps to refactor your expression as:
use strict; use warnings; my @opts = qw(K1 ASC GEB N1); my $alts = join '|', @opts; my $re = qr{^(?:$alts)_(\w*\d*)$}; print "Matched $1\n" if 'GEB_S1' =~ $re;
In reply to Re: Dynamic Regular Expression
by GrandFather
in thread Dynamic Regular Expression
by Pratikh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |