Last active
February 28, 2018 05:23
-
-
Save AndyG/381adc4bb9516cf3089b652d65afa18f to your computer and use it in GitHub Desktop.
Fixed Rule
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
for (rule in rules) { | |
val matcher = rule.matcher.reset(mutableSource) // Faster than creating a new Matcher | |
if (matcher.find()) { | |
// Do stuff with the rule that matched the text | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment