in reply to have to Extract substring after '/' character

As stated, the problem can be solved as simply as:
( $path ) = /(\/.*)\s*$/;

One world, one people