regex not value code example
Example: regex not something
// You can use (?!...) like the example below
let names = ['JOAO', 'JOHN', 'JOANA', 'JOABE'];
for(let n of names)
{
/(JO)(?!A)/.test(n);
// only true on 'JOHN'
}
// You can use (?!...) like the example below
let names = ['JOAO', 'JOHN', 'JOANA', 'JOABE'];
for(let n of names)
{
/(JO)(?!A)/.test(n);
// only true on 'JOHN'
}