How to define if string have a necessary substrings. With regular expression. In one step

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:

  1. :param1/path1/:param2 – correct, with defining groups {param1, param2}
  2. path1/path2/path3 – incorrect
  3. path1/:param1 – correct, with defining group {param1}

Is it possible to do in one step with a help of regular expression?