javascript regexp negate string code example Example: regex negate ^(?!.*bar).*$ serial_number: [^((?!null).)*$]+