AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Regular expression (https://forums.alliedmods.net/showthread.php?t=2732)

sanaell 06-15-2004 05:04

Regular expression
 
Does REGEXP exist in amx script ?

i want test

a big pattern like this

Code:

var %a = 1 , %i
  While ($vulglist(%a)) {
    var %vulg = $vulglist(%a) , %pasvulg = $pasvulglist(%a)
    %i = $calc( %i + ($regex($phrase($1-),/( $+ %vulg $+ )/ig) - $regex($phrase($1-),/( $+ %pasvulg $+ )/ig)) )
    inc %a
  }
  return %i

that return 1 or more if a word is in the vulglist pattern and not in pasvulglist pattern

like
if i have
chat in vulglist
and
lechat in pas vulglist
so
chat is not count

BAILOPAN 06-15-2004 12:44

No

devicenull 06-15-2004 16:15

You could write a module to do it.. hint hint


All times are GMT -4. The time now is 14:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.