negate in regex code example Example 1: regex diferent of /^((?!badword).)*$/g Example 2: regex negate ^(?!.*bar).*$ serial_number: [^((?!null).)*$]+