in reply to Re^2: creating qr from existing regex
in thread creating qr from existing regex
Maybe use split
pojmy $string = '/.*uba$/i'; my @f = split '/',$string; my $qr = ($f[-1] eq 'i') ? qr/$f[1]/i : qr/$f[1]/; my $cursor = $collection->query( { name=> $qr });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: creating qr from existing regex
by Bobert1234 (Novice) on Feb 09, 2018 at 06:54 UTC | |
by AnomalousMonk (Archbishop) on Feb 09, 2018 at 14:47 UTC | |
by Your Mother (Archbishop) on Feb 09, 2018 at 18:30 UTC |