I have the following input:
Fatura Cliente: 1.7852964.34
CPF/CNPJ: 09022317000222
I need to get only the "Customer Invoice" numbers, ignoring scores, returning only 1785296434
, for this I am using the following regex:
Fatura Cliente[\D]+(\S+)
But later I need to treat and replace the scores to turn into a sequence of numbers.
How do I get regex to return a sequence of numbers by ignoring scores for the capture group without having to replace later in the code?
Capturing by the first regex already formatted without the scores is it possible or need to give a String.replace or String.replaceAll (regex) after the first capture with regex?