I want to replace this strings:
- http://fitness.com/gorilla-bumpers - http://www.fitness.com/gorilla-bumpers with the expression "Product: gorilla-bumpers".
I have the following code:
final String url = eElement.getElementsByTagName("url").item(0).getTextContent();
final String qty = eElement.getElementsByTagName("quantity").item(0).getTextContent();
//I 've got "url" and "qty" values from Xml after parsing it
String product = url.replace("http://fitness.com/", "Product: ");
System.out.println(product + " was added to the cart with Qty = " + qty);
How can I add one more replacement in Java? Will be appreciate for several variants providing. Thank you
url.replace("http://fitness.com/", "Product: ").replace("","").replace....