Monday, July 11, 2011

Counting parentheses with REGEX in Java?

RegEx includes groups, but you can spend all day writing the matcher. With grouping the matcher counts from right to left the groups it finds. Your expression has to ever so precise (\\(\d.*\\)) would be my first stab at it.

No comments:

Post a Comment