Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

negation of an expression

$
0
0
i thought it would be simpler, however i wasnt able to get regular expression for the below.

i want to extract the words which are not in a particular pattern.

say in the below sentence

clicking the (Run Match) button (or F5) to see what (happens).

i want to extract all the words which are not defined in brackets (). so the output will be

clicking
the
button
to
see
what

below is expression which i defined. it is not working. can any one point out the mistake in the expression ?

(?!\(\w+\))

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>