I'm trying to write a function which takes in a string such as String code = "<div> style="width: 3%" </div>"
I would like to replace the 3% to another number (can be more than 2 digits) so 400% etc.
I'm currently getting the charAt(21) but this is only the index of 3, so if I had 20% in that place then my code would not work.
Is there another way to replace the place where the % is stored. (also doing this by not knowing what number the current % is)