Quantcast
Channel: MobileRead Forums - Reading and Management
Viewing all articles
Browse latest Browse all 23795

Regex: exclude sequence

$
0
0
Hi, I'm using this regex to find all words ending with apostrophe, excluding the word po’.
Code:

(([^\s]..)|([^p].)|(.[^o]))’\b
Now I'd like to exclude other words (fa’, di’...), so I'm wondering if there is a way to exclude a sequence, something like:
Code:

(?!(\bpo|\bfa|\bdi))’\b
or
Code:

[^(<\bpo>|<\bfa>|<\bdi>)]’\b
(I know these examples don't work... but I hope I gave an idea about what I'm searching for)

:thanks:

Viewing all articles
Browse latest Browse all 23795

Trending Articles