mIRC Homepage
Posted By: roadbump on $1: - 06/12/05 06:19 PM
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
Posted By: genius_at_work Re: on $1: - 06/12/05 08:10 PM
Try here: http://www.regular-expressions.info/

-genius_at_work
Posted By: Kelder Re: on $1: - 08/12/05 09:54 AM
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/)
© mIRC Discussion Forums