In java, I am trying to define form strings: optional underscores, capital letters, and then braces containing two parameters. That is, things likeMAX{1,2} FUNC{3,7} _POW{9,10}
I decided to defer parameter processing until a later time, so I use a regex:
_?[A-Z]+//{.*//}
But when I try to compile it into a template object, I get the following error:
Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repetition near index 9
_?[A-Z]+//{.*//}
^
Does anyone know what the problem is?
source
share