My First Regex Script

By F*U*R*B*Y* on Aug 31, 2008

Well this is pretty much my first regex script.....

When i say it, i mean, i built it from scratch, all my other regex scripts i had someone else do regex, didn't really understand it but yeah ;)

had a bit of help from the coders in #mricscripting on Undernet :) they're legends and know who they are :P

Enjoy :)

P.S. Change Furb(y|ster)?|Sasuke to your nicknames

Example: Your nick = Test

you want to be highlighted if they say Te|Tes|Test change it to

Te(s|st)? :)

on $*:text:/(Furb(y|ster)?|Sasuke)+/Si:#:{
  if (%highlight. [ $+ [ $nick ] ]) { halt }
  else {
    set -u10 %highlight. [ $+ [ $nick ] ] 1
    beep
    if ($window(@HighlightMe)) {
      aline @HighlightMe $nick in $chan on $network just said your name in the following sentence.
      aline @HighlightMe $replace($1-,$regml(1),$+(04,$regml(1),))
      aline @HighlightMe $str(-,100)
    }
    else {
      window @HighlightMe
      aline @HighlightMe $nick in $chan on $network just said your name in the following sentence.
      aline @HighlightMe $replace($1-,$regml(1),$+(04,$regml(1),))
      aline @HighlightMe $str(-,100)    
    }
  }
}

Comments

Sign in to comment.
Zmodem   -  Sep 03, 2008

LoL, learned regex recently? Hrmm, I learned it quite some time ago, I just always seem to forget about it when I'm coding lol.

 Respond  
F*U*R*B*Y*   -  Sep 03, 2008

i learnt regex at least two dates ago, perhaps yesterday but not today :P

Edit:

[proof]
Heres proof: Date Added Aug 31, 2008

^Neptune
Comments: 218

mIRC Snippet: My First Regex Script
Posted on Sep 3, 2008 4:32 am

[/proof] :P

 Respond  
^Neptune   -  Sep 03, 2008

Weird how I learned regex on the same day as you :O

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.