I have a string, and I want to define if it a correct pathname and that at least one (/:)|(^/?:)
pair of symbols exists and that all in one step.
Correct pathname must include next symbols [a-zA-Z0-9.~!$&'()*+,;=@-_s:] in each portion, divided by ‘/’.
For example:
:param1/path1/:param2
– correct, with defining groups {param1, param2}path1/path2/path3
– incorrectpath1/:param1
– correct, with defining group {param1}
Is it possible to do in one step with a help of regular expression?