How can I capture the number (250 in the following case) and insert it in the replacement string?
What I have: "CHAR () FOR BIT DATA(250) NOT NULL"
What I want: "CHAR (250) FOR BIT DATA NOT NULL"
I'm looking to do this in Scala, but I guess it simply uses java.util.regex.
Here's what I've tried:
"""CHAR () FOR BIT DATA(250) NOT NULL""".replaceAll("CHAR \\(\\) FOR BIT DATA\\(([0-9]+)\\)", "Here is the string: $0")
I simply don't know how to get only the digits to re-insert them in a new string.