I have a script and in one of the lines:
return $flag.text().match(/[0-9 ]+(?=\%)/i);
read the numbers of a tag p
.
Ex:
<p>Desconto 15%</p>
In case it will read the number 15.
From what I know this line does not read the number with a semicolon ex: 9,09 or 9,09% with%.
In this example if it reads only up to the comma, how would I make this script read the numbers after the comma?