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
tete
ortiti
ortata
ortete
it returnfalse
if my value
to
orze
orwe
it returntrue
toto|titi
as 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
to
orze
orwe
it returnfalse
i tried
"(^|\|)(?!" + value + ")(\||$)"
didn't work"(^|\|)(?!" + value + ").*(\||$)"
didn't work
I have no more idea, someone would have one ?