mIRC Home    About    Download    Register    News    Help

Print Thread
#136995 06/12/05 06:19 PM
Joined: Dec 2005
Posts: 1
R
Mostly harmless
OP Offline
Mostly harmless
R
Joined: Dec 2005
Posts: 1
on $1:text:/(?<=^| ) (word1|word1) (?= |\W|$)/ :#: { commands }

where is syntax, etc. explained?

i know the basics of the metacharacters, but the syntax doesn't have any thing to do with mirc help for regex or web tutorials.

thanks

#136996 06/12/05 08:10 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Try here: http://www.regular-expressions.info/

-genius_at_work

#136997 08/12/05 09:54 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
The mIRC syntax is in the help file mostly. This should be your first concern, mIRC does not know that /stuff/ is a regex, so if you put characters in there that mIRC can identify as someting scripting related, it will, and this will break your script. so, $regex(c a d,/a|b/) works, $regex(c a d,/a | b/) will not, mIRC sees the | as a command separator, giving you 2 incorrect commands. Basically, watch out for |{}[]:(),%$# as they might mean something to mIRC you didn't intend.

Once you're familiar with that, download the PCRE manual since it's that library that's used in mIRC. The first 1475 or so lines are unneeded for you, but the regular expression details that follow are about everything you need to know. Study it, try it out, try it some more, etc... There are also enough regex mIRC tutorials out there, search for them, read them, try them out smile

One last thing, there is one extra switch not in pcre.txt, $regex($1-,/stuff/S) is the fast way for $regex($strip($1-),/stuff/)


Link Copied to Clipboard