Login | |
|
 |
RE: regexp match problem - 5/14/2008 4:10:06 AM
|
|
 |
|
| |
ebgreen
Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
|
Dim oRE : Set oRE = New Regexp Dim strTest Dim colMatches Dim oMatch strTest = "12345 ABC_E12345 54321 98765 ABC_E98765 00 123 A" oRE.Pattern = "(ABC_E\d{5})|(\d{5})" oRE.Global = True Set colMatches = oRE.Execute(strTest) For Each oMatch In colMatches WScript.Echo oMatch.Value Next
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: regexp match problem - 5/14/2008 5:15:28 AM
|
|
 |
|
| |
dm_4ever
Posts: 2366
Score: 38
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
Maybe try... "(ABC_E\d{5})|(\b\d{5}\b)" ^ = start of entire string or if inside [] then it mean NOT the things you put in there $ = end of entire string
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
|
|