Login | |
|
 |
RE: newbie visual basic script help - 5/15/2008 7:37:27 AM
|
|
 |
|
| |
ebgreen
Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
|
So I made a test file C:\Temp\Foo.txt and put the contents in it that you indicated. See if this code then gets you going in the right direction: Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject") Dim oRE : Set oRE = New Regexp Dim strFileContents : strFileContents = oFSO.OpenTextFile("C:\temp\foo.txt").ReadAll Dim colMatches Dim oMatch Dim strSub oRE.Pattern = "(.*)(SPECIFIC PICTURES BEING COPIED TO \s(.*\s){6})(.*)" Set colMatches = oRE.Execute(strFileContents) WScript.Echo oRE.Replace(strFileContents, "$1$3")
_____________________________
"... 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
|
|
| |
|
|
|
|
|