How to create a regex to verify the linux path and allow variables to be used

Keywords´╝Ü javascript linux

Question: 

How to create a regular expression to verify the linux path and allow variables in the path

like: $JOB_Name/WORKSPACE/bin

Answers: