I have this code:
preg_match("/[^-+*%0-9]+/", $your_string, $matches)
It works great but I would like to be able to add the "/" character and I don't know how.
I have this code:
preg_match("/[^-+*%0-9]+/", $your_string, $matches)
It works great but I would like to be able to add the "/" character and I don't know how.
You can use a different pattern delimiter, such as a hash, instead of a forward slash, and then just match the forward slash like any other character:
preg_match('#^/#', $subject);