Thursday 15 April 2010

VBScript alternative to PHP's preg_match -


I will have to re-type the following PHP snippet (which filters a non-numeric character from the supply string);

In VBScript $ new_string = preg_replace ("/ [^ 0-9] /", "", $ old_string) Any suggestions?

  function repNum (myString) RegularExpressionObject = Set New RegExp with RegExpressionObject. Pattern = " [^ 0- 9] ". IgnoreCase = True. Global = True and End Random = Regular Expiration Object. Replay (MyString, "") Regular ExpressPress = Set some End Function    

No comments:

Post a Comment