How to match only complete words in Oracle regexes? [duplicate]
Possible Duplicate:
Regex to remove blacklisted words from a sentence
How can I use a regex in Oracle to filter out a list of blacklisted (obscene) words, such that if a blacklisted words is like 'Bill Joseph'
Then 'I am Bill Josephine'
is valid
'I am Bill Joseph.'
is invalid
'I am Bill Joseph,'
is invalid
'I am Bill Joseph '
invalid
'I am Bill Joseph<any non alphanumeric>'
is invalid.
Similarly 'I am .Bill Joseph'
is invalid
'I am <any non alphanumeric>Bill Joseph开发者_如何学运维'
is invalid. What you're looking for is the word-boundary operator:
\bBill Joseph\b
精彩评论