[Templates] Regular expression modifiers
Andrew Beattie
andrew@tug.com
Sat, 23 Nov 2002 20:38:18 -0000
Is there any way to specify the /i modifier to my regular expression?
I'm thinking somthing along the lines of:
[% somestring.match('https?://').i ? "looks like an URL" : "just some text" %]
Since that is the actual string I happen to be looking for, I can do:
[% somestring.match('[Hh][Tt]{2}[Pp][Ss]?://') ? "looks like an URL" : "just some text" %]
But it would be nice if we could use /i, particularly for .replace
I did google for "regular expression modifier" and "lower case" on the tt2.org site,
but only found a hundred references to the case of variables and reserved words, but
if I've missed something obvious in the manual, please feel free to taunt me :-)
Andrew