I have a string that looks like this:
mynum(1234) and mynum( 123) and mynum ( 12345 ) and lastly mynum(#123)
I want to insert a # in front of the numbers in parenthesis so I have:
mynum(#1234) and mynum( #123) and mynum ( #12345 ) and lastly mynum(#123)
How can I do this?
Using regex pattern matcher and a replaceAll chokes on the ( in front of the number and I get an
java.util.regex.PatternSyntaxException: Unclosed group near ...
exception.