Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?

Ulf Dittmer wrote:Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?

Thanks, there was some confusion ,after reading i got that i thought \\b is for escape sequence backspace.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com