Login | |
|
 |
RE: Regular Expression Help - 5/31/2006 6:40:05 AM
|
|
 |
|
| |
ebgreen
Posts: 4970
Score: 31
Joined: 7/12/2005
Status: offline
|
The problem you are going to have is the . for the extension. you won't want to drop it. What I would do is this: 1) Use Left() and Instr() to get everything up to the last . 2) take that string and hand it to this function: Function FixChars(strString) Set oRE = New Regexp oRE.Global = True oRE.Pattern = " " strTest = oRE.Replace(strString, "_") oRE.Pattern = "\W" FixChars = oRE.Replace(strString, "") End Function 3) Now put the fixed string back together with the extension from the original string.
_____________________________
"... 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
|
|
| |
|
|
|
|
|