Passing regex arguments

Post Reply
User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Passing regex arguments

Post by tsuujin »

I was wondering if there was any way to pass a regex argument to mudlet (such as making a regex case insensitive).

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Passing regex arguments

Post by Vadi »

http://www.pcre.org/pcre.txt:
OPTION SETTING

(?i) caseless
(?J) allow duplicate names
(?m) multiline
(?s) single line (dotall)
(?U) default ungreedy (lazy)
(?x) extended (ignore white space)
(?-...) unset option(s)
->
(?i)^test$

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: Passing regex arguments

Post by tsuujin »

Doesn't seem to work in a tempRegexTrigger

hlTarget = tempRegexTrigger("(?i)\\b"..target.."\\b",...)

still matches the pattern, but only exactly as it stored, not case insensitive.

Post Reply