mrachow
Posts: 509
|
| Posted: 05/24/2005, 9:25 AM |
|
What I can offer
StringToSearch = "[Microsoft][ODBC SQL Server Driver][SQL Server]--User doesn't exist-- (Microsoft OLE DB Provider for ODBC Drivers)"
With RegularExpressionObject
.Pattern = "--"
.IgnoreCase = False
.Global = True
End With
Set expressionmatch = RegularExpressionObject.Execute(StringToSearch)
If 2 = expressionmatch.Count Then
s = expressionmatch(0).FirstIndex
e = expressionmatch(1).FirstIndex
Response.Write "<B>" & mid(StringToSearch, s+1, len(StringToSearch) -(len(StringToSearch)-e) - s + 2) & "</B>."
Else
Response.Write "<B>" & StringToSearch & "</B>."
End If
Set RegularExpressionObject = nothing
_________________
Best regards,
Michael |