开发者

How to match only complete words in Oracle regexes? [duplicate]

This question already has answers here: Closed 11 years ago.

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

but '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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜