I seem to have hit my regex knowledge limit and my google-fu is failing me.
I try to not-match strings, with preg_match
that either start with one or more slashes or (and there it gets tricky for me) with ((
My original which was used to just match / looked like that:
\^[^\/].*$\
And it worked beautifully. However when I try to match two brackets on the beginning of the string I fail. I would post all my approaches I tried but I don't think adding them will clarify.
Best I could do was simply adding the bracket into the character class which kind of works but already with one bracket:
\^[^\/(].*$\
Examples:
String: Hello
Desired result: Match
String: /Hello
Desired result: No Match
String: //Hello
Desired result: No Match
String: (Hello
Desired result: Match
String: ((Hello
Desired result: No Match
I really hope you could give me a push into the right direction.
Thanks