Part of the code I\'m working on uses a bunch of regular expressions to search for some simple string patterns (e.g., patterns like \"foo[0-9]{3,4} bar\"). Currently, we use sta
Try matcher.reset("newinputtext") method to avoid creating new matchers each time you are calling Pattern.matcher.
matcher.reset("newinputtext")