in reply to Regex from a string
But I can't figure out how to let the user set flags like i. Eval is generally a bad idea unless you know exactly who is going to be using your script.$_ = 'Hello my name is A0'; my $r = 'Hello\smy\sname\sis\s(\w.*)'; print $1 if m/$r/;
|
|---|