Advertisement
Guest User

Untitled

a guest
Mar 15th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.84 KB | None | 0 0
  1.     ; %urlpattern = ^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$
  2.     while (%wordCount > 0) {
  3.       var %currentWord = $gettok(%template [ $+ [ $nick ] ],%wordCount,32)
  4.       echo $chan currentWord: %currentWord
  5.       ;echo $chan template: %template [ $+ [ $nick ] ]
  6.  
  7.       echo $chan checking word for urls...
  8.  
  9.       ; ---- Below line always returns 0 on url token, but when doing //echo $chan $regex(url, http://something.com , %urlpattern) it returns 1
  10.       echo $chan results: $regex(url, %currentWord , %urlpattern)
  11.  
  12.       if ($regex(url,%currentWord,%urlpattern) >= 1) {
  13.         echo $chan WENT!
  14.         var %template [ $+ [ $nick ] ] $reptok(%template [ $+ [ $nick ] ], %currentWord, %urlColor $+ %currentWord $+ , 0,32)
  15.       }
  16.       dec %wordCount 1
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement