Page 1 of 1
Case insensitive RegEx?
Posted: Mon Jul 21, 2003 3:07 am
by Gleeb
I want to do something like '#\<title\>([/w/W]+)\</title\>#', but as you can see, it'll only match <title></title>. I can't seem to be able to tell how to make it case insensitive. Help?

Posted: Mon Jul 21, 2003 3:35 am
by Gleeb
*bump*
[thefly]Help Meeeee![/thefly]
Posted: Mon Jul 21, 2003 4:30 am
by twigletmac
Just add an 'i' at the end:
Code: Select all
#\<title\>(ї/w/W]+)\</title\>#i
Mac
Posted: Mon Jul 21, 2003 4:45 am
by Gleeb
That's it? Damn it

Posted: Mon Jul 21, 2003 9:52 am
by m3rajk
yes.
posix ones are done in php by adding an i to the function call (ereg v eregi) and perl are done in the pattern.
in perl you have i for case insensitive and g fro global.
so '|<pattern>|i' is insensitive to case and | needs to be escaped in the pattern