hey dogfighter
as u told u r familier with regular expressions so i m giving u a sample for implementing these in vb
use following function
and pass pattern and text to be parsed
vb Code:
Function TestRegExp(sPattern As String, sText As String)
Dim oRegExp As RegExp
Dim oMatch As Match
Dim oMatches As MatchCollection
Dim sOutput As String
Set oRegExp = New RegExp
oRegExp.Pattern = sPattern
oRegExp.IgnoreCase = True
oRegExp.Global = True
If (oRegExp.Test(sText) = True) Then
Set oMatches = oRegExp.Execute(sText)
For Each oMatch In oMatches
sOutput = sOutput & "Match found at position "
sOutput = sOutput & oMatch.FirstIndex & ". Match Value is '"
sOutput = sOutput & oMatch.Value & "'." & vbCrLf
Next
Else
sOutput = "String Matching Failed"
End If
TestRegExp = sOutput
End Function