I just found a bug in some code I didn\'t write and I\'m a bit surprised:
Pattern pattern = Pattern.compile(\"\\\\d{1,2}.\\\\d{1,2}.\\\\d{4}\"); Matcher matc
Yes, compiling the Pattern on each use is wasteful, and defining it statically would result in better performance. See this SO thread for a similar discussion.