I need to make sure that this line is not "Choose a value." To do this, everything else must match the pattern except this exact string.
I looked around and tried many combinations at http://www.regular-expressions.info/javascriptexample.html , but nothing like the trick.
I canโt deny the test, the template has to do it all, since I will feed this to the extent of checking the form. If the selection contains this text, I will return an error, etc. So the pattern should match anything other than this exact line,
I tried a lot of things (?! Select an account)! (Choose an account)! (^ (Select account) $)
etc ... I donโt understand how some of these mechanisms work. I get "starts with" and "ends with", but it seems I have not found a simple negation operator.
For some reason, everywhere I seek explanations for regular expression. I do not get this simple use case, it may not be common.
How can i do this?
Thanks!
source share