VBScript support should allow use of Replace and others.
Maybe this is VBScript 2.0 functionality?
Just a thought.
mike.griffin wrote:Can you give me an example, I'm not sure what you mean?
mike.griffin wrote:I'm not really sure to what level the Microsoft script control is compliant, I believe it is though, do you know of a VBScript method that is only available in the latest version? We can try it out and verify.
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' Create variable.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
Set Matches = regEx.Execute(strng) ' Execute search.
For Each Match in Matches ' Iterate Matches collection.
RetStr = RetStr & "Match found at position "
RetStr = RetStr & Match.FirstIndex & ". Match Value is '"
RetStr = RetStr & Match.Value & "'." & vbCRLF
Next
RegExpTest = RetStr
End Function
MsgBox(RegExpTest("is.", "IS1 is2 IS3 is4"))
Match found at position 0. Match Value is 'IS1'.
Match found at position 4. Match Value is 'is2'.
Match found at position 8. Match Value is 'IS3'.
Match found at position 12. Match Value is 'is4'.
Users browsing this forum: No registered users and 0 guests