Trying to create a regex that ignores a proper integer (1, 5, 999, etc.) and forward slashes (/), but finds a match in everything else. For example, it would find a match the following:
testtest1test-1but ignores
1557This is for a mod rewrite.
[^-0-9\/]+ should do the trick, I think. It'll match any string that contains a non-digit.
Edited to add minus sign which would also be allowed in an integer, and then to include the forward slashes mentioned in the question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With