Regex to say not this character in MongoDB
mongodb, regex
Solution
- Use `{email: /^[^@]*$/}`.
- Or use `{email: {$not: /@/}}`.
Problem
I'm doing some work with mongodb and Regex. So, I have run: ``` { "email": /@/ } ``` Now I want to say: ``` { "email": does not contain @ } ``` any help would be appreciated