mIRC Home    About    Download    Register    News    Help

Print Thread
#190318 19/11/07 03:17 AM
Joined: Oct 2007
Posts: 92
N
Babel fish
OP Offline
Babel fish
N
Joined: Oct 2007
Posts: 92
Code:
on *:text:#: {
  if (*damn* iswm $1-) msg $chan do not curse $nick 
}


Code:
if (*damn* iswm $1-)


How can I do that on $regex

I tried
Code:
if ($regex($1-,/(?(damn)?)/Si)


but didn't worked

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Code:
ON $*:TEXT:/damn/i:#:

That'll do the matching in the event trigger.

Code:
if ($regex($1-, /damn/i)) {

will do it for an if statement.

By default, regular rexpressions will happily do partial matches, closer to an 'isincs' than a 'iswm', but close enough.


Link Copied to Clipboard