so i want the regex match this type of elements, this regex is created in javascript.
I assume in mongo you need \\ to escape instead of one
element: toto|titi|tata|tete
if my value is
teteortitiortataorteteit returnfalseif my value
toorzeorweit returntruetoto|titias value does not matter because i have a regex removing specials characters from value (it will becometototiti)
atm i used "(^|\|)" + value + "(\||$)" to get the opposite
- when my value is tete or titi or tata or tete it return true
- when my value
toorzeorweit returnfalse
i tried
"(^|\|)(?!" + value + ")(\||$)"didn't work"(^|\|)(?!" + value + ").*(\||$)"didn't work
I have no more idea, someone would have one ?