I am trying to create a regex for checking these 7 characters ('/', '', '[', ']', '', ':', '?') in any order as long as there is at least one character exists in the string. I tried using the Regex Generator and it output this expression :.[.].\/*? but it doesn't work.
Asked
Active
Viewed 12 times
0
-
try `[\/\[\]:?*]*` – Ghost Ops Sep 28 '21 at 07:16
-
Just `/[\/\\[\]*:?]/`, you need a *character class*. – Wiktor Stribiżew Sep 28 '21 at 07:17
-
[\/\[\]:?*]* it returns true even if there is no character exists in the string – Daniel Soriano Sep 28 '21 at 07:18
-
i tried this one /[\/\\[\]*:?]/ but it returns true on '\' character – Daniel Soriano Sep 28 '21 at 07:20