mIRC Home    About    Download    Register    News    Help

Print Thread
Help $regex #207982 08/01/09 10:23 PM
Joined: Mar 2008
Posts: 47
N
nok Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 47
You can read a file.txt?
Code:
$regex($read(texto.txt,%i),/\b(espaņa|espaņol|espaņola|madrid)\b/giS)

//file.txt
//espaņa
//espaņol
//espaņola
//madrid
//

Re: Help $regex [Re: nok] #207983 09/01/09 12:00 AM
Joined: Jul 2006
Posts: 3,702
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,702
I'm not sure about what you want since you're not really clear, but see the /help /filter, with -g, you can perfom a regex match on each line of a text file and then do what you want with them.

For example :

filter -g texto.txt output.txt /\b(espaņa|espaņol|espaņola|madrid)\b/giS

fill output.txt with all lines that match the regular expression.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net