in reply to RegEx is required for the below pattern

Have you thought about using split (using / as the delimiter) instead of a regex?