Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Search a Text File for Strings Meeting a Specified PatternContent of Search a Text File for Strings Meeting a Specified Pattern.vbsMD5 Hash: 7815A5C5E62EEC66C3F5B37DED508FDD |
||
Const ForReading = 1
Set objRegEx = CreateObject("VBScript.RegExp") objRegEx.Pattern = "^[1-9]...GRP" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\Scripts\Test.txt", ForReading) Do Until objFile.AtEndOfStream strSearchString = objFile.ReadLine Set colMatches = objRegEx.Execute(strSearchString) If colMatches.Count > 0 Then For Each strMatch in colMatches Wscript.Echo strSearchString Next End If Loop objFile.Close | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |