Created
January 12, 2011 20:50
-
-
Save johndemic/776853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.io.FileUtils | |
def json = FileUtils.readFileToString(new File("assets.json")) | |
def matcher = json =~ /\{ ".oid" : ("[0-9a-f]{24}") \}/ | |
def stringBuffer = new StringBuffer(); | |
matcher.reset() | |
while (matcher.find()) { | |
matcher.appendReplacement(stringBuffer, matcher.group(1)); | |
} | |
matcher.appendTail(stringBuffer); | |
println stringBuffer.toString() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment