in reply to help needed to solve in regex
You're using a string where a regular expression is expected.
my $find_re = qr/1\.2\.3/i; ... grep /$find_re/, ... ...
or
my $find_str = '1.2.3'; my $find_re = quotemeta($find_str); ... grep /$find_re/i, ... ...
or
my $find_str = '1.2.3'; ... grep /\Q$find_str\E/i, ... ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help needed to solve in regex
by diotalevi (Canon) on Jan 10, 2007 at 05:59 UTC | |
by ikegami (Patriarch) on Jan 10, 2007 at 06:26 UTC |