I want strip out specific anchor tags from a string. From the following example, I want to remove only the anchor tags containing 1.1.3 and replace it with flat text, however other links should remain as it is. i want the create a generic method wherein
I pass in the required string, and the required anchor tag to be replaced with the flat text. It is not that I need 1.1.3 is to be replaced in all the cases, there are different tags in different set of strings. I want a generic method with two input parameters
, a string and the required anchor tag to replace with flat text.
For example,
String x = description is found in <a ......contenttype="", title='">1.1.3</a> and also in <a..............contenttype="", title="">1.1.4</a>
Required Output:
String x = description is found in 1.1.3 and also in <a..............contenttype="", title="">1.1.4</a>
Co ...
Go to the complete details ...