Loading |
VBScript |
JavaScript |
Powershell |
Search Options: 2008 Scripting Games Sudden Death Event 9Content of 2008 Scripting Games Sudden Death Event 9.vbsMD5 Hash: BF0C9C569DE8221CA5E72B94EE71F69E |
||
' This is my Solution for the Scripting Games 2008
' For more Information look at ' http://www.microsoft.com/technet/scriptcenter/funzone/games/games08.mspx Option Explicit Dim ofso : Set ofso = Createobject("Scripting.FileSystemObject") Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Call Main() ' --------------------------------------- Sub Main() Dim strFile, sLine strFile = "C:\Scripts\symbols.txt" If ofso.FileExists(strFile) then Dim oFile : Set oFile = ofso.OpenTextFile(strFile, ForReading) sLine = oFile.ReadAll oFile.Close End if wscript.echo instrReplace("[^A-Za-z0-9 ]", sLine) End Sub ' --------------------------------------- Private Function instrReplace(strPattern, strSearch) Dim oRegEx : Set oRegEx = CreateObject("VBScript.RegExp") Dim colMatches, strMatch, sReturn oRegEx.Global = True oRegEx.Pattern = strPattern Set colMatches = oRegEx.Execute(strSearch) For Each strMatch in colMatches strSearch = Replace(strSearch, strMatch, "", 1, -1, 1) Next instrReplace = strSearch End Function | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |