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