I have a String of url which can be represented as
urlString = String1 + "/23px-" + String2.
The amount of pixels is different every time (can be 23px, 19px and so on). The length of String1 and String2 unknown and varies. String1 can also contain two digits but never in combination with "px".
I tried to use the replace methods that all my urlStings have, let's say, 25px:
urlString.replace("\\d+px","25px")
urlString.replace("\\d{2}px","25px")
but it doesn't work. Where's the mistake?
replaceAll(replacedoesn't take a regular expression).