I need a regex which can match "/
but not "/"
or "/>
. So for example:
"/hello"
: match the"/
"/cool.php"
: match the"/
a + "/" + b
: do not match<input name="hello"/>
: do not match
Using regex builder, I've managed to create a regex "\/[^\>"]
which match "/
but plus one character. So "/hello"
will match "/h
. This is wrong.
I'm a little newbie on regex. What's wrong in my regex? Can you fix it and probably give a little explanation of why it's wrong and what part do you fix and why?