How to verify a string that only permits numbers letters and the characters like ‘.’, ‘/’, ‘_’, ‘-‘ and only permit 40 characters.
I was doing something like this REGEXP_LIKE(path, '[a-zA-Z0-9_./-]{2,40}$') but is not working good.
Can anyone help me with this regex?
Well, it won’t limit to 40 characters because it isn’t anchored to the beginning of the string. Try:
Other than that I don’t see anything glaringly wrong with it, assuming of course that you do mean for the minimum length to be 2 characters.