Showing posts with label text processing. Show all posts
Showing posts with label text processing. Show all posts

Friday, September 05, 2008

Regular Expression in Java to Strip HTML Tags

Regular Expression in Java to Strip HTML Tags; just for my own reference:

sMyString = sMyString .replaceAll("\\<.*?>","");



Wednesday, July 16, 2008

Replacing Brackets in a String (Java)

Trivial issue really but something I always forget...

sNiceString = sNiceString.replaceAll("\\(", "");

or

sNiceString = sNiceString.replaceAll("\\)", "");


You could probably use a purer regular expression too but this does the job.