mIRC Home    About    Download    Register    News    Help

Print Thread
#30721 19/06/03 12:50 AM
Joined: Dec 2002
Posts: 25
V
v0id Offline OP
Ameglian cow
OP Offline
Ameglian cow
V
Joined: Dec 2002
Posts: 25
I'm not sure if this is a bug or just a missing feature, but it seems that one is unable to do a case-insensitive match while using the regex switch with /filter.

#30722 19/06/03 03:45 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Solution.

/filter and $hregex (and probably others) don't interpret flags that appear outside the delimiters. For whatever reason, mIRC simply strips the delimiters and any flags that follow. eg: /i

The same flags can be used inside the expression though, placed before the pattern you wish for it to effect. This even gives you more control, allowing you to make just part of the expression case insensitive (i *think*, haven't tested it and don't know how to close/terminate it either.)

/expression/i == /(?i)expression/

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#30723 19/06/03 03:03 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yes you can use it to just make part of the expression case-insensitive:

(?i)this-is-case-insensitive(?-i)this-is-case-sensitive

Just add a - in front to remove the flag.


Link Copied to Clipboard