Reputation: 717
I would like to match a string that not start with keyword "side" (case sensitive)...
I have tried like this: /^(?!side).*$/i
but don't work for me because I would like to accept for example: "side1", "side 1"
I hope I was clear
Edited:
Bye
Upvotes: 0
Views: 60
Reputation: 784958
You can use this negative regex with word boundary:
/^(?!side$)/i
Upvotes: 1