Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function ParseJSON(strTxt)
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objFile = objFSO.OpenTextFile( AppData & ".technic\installedPacks", 1)
- installedPacks = objFile.ReadAll
- Dim oRE
- Dim colMatches
- Dim oMatch, I
- Set oRE = New Regexp
- oRE.Global = True
- oRE.Pattern = """build"":\s""(.+?)"""
- oRE.IgnoreCase = False
- Set colMatches = oRE.Execute(strTxt)
- For Each oMatch In colMatches
- If oMatch.SubMatches(0) = "recommended" Then
- Else
- strNextmap = oMatch.SubMatches(0)
- End If
- Next
- If strNextmap = "" Or IsNull (strNextmap) Then
- ParseJSON = "No Match Found"
- Else
- ParseJSON = strNextmap
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement