- /^((?!Hello).)*$/ does not match a string containing hello
Example 1
const 你好吗 = /^((?!你好).)*$/.test('你不好') //true
const 你好吗 = /^((?!你好).)*$/.test('你好') //false
renderings
Example 2
- need
- does not match a string
/api/login
containing/api/register
- does not match a string
code
const 例1 = /^((?!\/api\/(login|register)).)*$/.test('/api/login') // false
const 例2 = /^((?!\/api\/(login|register)).)*$/.test('/api/register') // false
const 例3 = /^((?!\/api\/(login|register)).)*$/.test('/api/hello/dfhdf/dfhd?n=1') // true
const 例4 = /^((?!\/api\/(login|register)).)*$/.test('/apiapipaip') // true