[Melbourne-pm] case insensitive REs
Craig Sanders
cas at taz.net.au
Tue May 6 22:31:05 PDT 2008
On Wed, May 07, 2008 at 03:23:58PM +1000, Craig Sanders wrote:
> $mods = 'go';
> $mods = 'i' . $mods if ($case);
> $re = "(?$mods)$re";
>
> while (/($re)/g) {
> ...
> }
doh! bad cut/paste/edit. change that final '/g' on the while line to
just '/':
while (/($re)/) {
repeat for both my examples.
craig
--
craig sanders <cas at taz.net.au>
Ninety percent of the politicians give the other ten percent a bad reputation.
-- Henry Kissinger
More information about the Melbourne-pm
mailing list