I was trying to write a pattern which doesn't contain binary string (let's assume 101
). I know that such expressions cannot be written using Regular Expression
considering http://en.wikipedia.org/wiki/Regular_language.
I tried writing the pattern for the above problem using Regular Expression
though and it seems to be working.
\b(?!101)\w+\b
What I wanted to ask is that can a regular expression be written for my problem and why? And if yes, then is my regular expression correct?