Thats really great what you just said. I was searching for such help for a while.
but there is an issue, how to make it match the expression only once. for example assuming word is:
The number of matches in the current code will be 2 as it counted go twice, although it should only be counted once as it should be matched only once.. so the score should be 1....