2
Does anyone know how to include a mask from a regex in a string?
For example, I own the following regexString pattern = "\\d{2}[/]\\d{3}.\\d{3}[/]\\d{4}";
and a variable with the following value String numeroProcesso = "010000012018";
. I want a function that returns me the following result: numeroProcessoComRegex = "01/000.001/2018"
. This would be simple if my regex were not dynamic, but the same can be changed the Pattern at any time.
I think the
.
of the regex was to be\\.
.– Victor Stafusa