Here are the specific validations I need for my URL:
cars : valid
cars/ : valid (Accepting any number of '/' after "cars")
cars- : invalid
cars* : invalid
carsp : invalid (Rejecting any character after "cars" except '/')
**cars/new: valid
cars/old: valid (After '/', anything is accepted)**
What should be the regular expression for this?
I attempted with: cars[/]*[^-]
Unfortunately, it did not work as expected.