Negative Lookahead (?! ... ) and Positive Lookahead(?= ... )
/^a(?!xyz)b$/
a = false
axyzb = false
ab = true : ab