Regular expressions in java
Posted
by rookie
on Stack Overflow
See other posts from Stack Overflow
or by rookie
Published on 2010-05-27T21:55:51Z
Indexed on
2010/05/27
22:01 UTC
Read the original article
Hit count: 196
String s= "(See <a href=\"/wiki/Grass_fed_beef\" title=\"Grass fed beef\" " +
"class=\"mw-redirect\">grass fed beef.) They have been used for " +
"<a href=\"/wiki/Paper\" title=\"Paper\">paper-making since " +
"2400 BC or before.";
In the string above I have inter-mixed html with text.
Well the requirement is that the output looks like:-
They have been used for paper-making since 2400 BC or before.
Could some one help me with a generic regular expression that would produce the desired output from the given input?
Thanks in advance!
© Stack Overflow or respective owner