I have the following string that comes from the content of a web page:
String entrada = "<!-- verVideo('nClycKgfetU','65660'); -->";
I want to transform this string using replaceAll (since there may be several) in:
String resultado = "http://img.youtube.com/vi/nClycKgfetU/0.jpg"
What I have so far:
x.replaceAll("<!-- verVideo\('", "http://img.youtube.com/vi/").replaceAll(",'65660'); -->", "/0.jpg");
The first replaceAll works fine, but the second will not work because the number 65660 is variable and random . I guess you have to replace it with some java pattern but I can not figure out what it is.