Grails

Regex to match exact word in a string

Hi, In my recent grails project, i needed to check the occurrence of a word in a string. I could have used contains() method of groovy , but the problem with contains() is that it also matches the word if the word is contained as a substring in any word. I searched a lot, but nothing worked out so i decided to use Regular expression...

by Vishal Sahu
Tag: string matching
14-Oct-2010