Thanks Jacques, it worked perfectly.
I have a follow up question, lets say I am also certain that there is going to be less than 4 alphabetical characters there and I want to match that as well for example my string would be:
$string = "1423/3838/894789BLAH/9387";
or
$string = "/73636/83/398/3BLAH";
or
$string = "BLAH3//33/3838/7474/"
or
$string = "/BLAH";
or
$string = "636BLAH"
AND NOT because there are more than 4 alphabetical characters:
$string = "BELABELA3434";
I modified your code as follow but it didn't work.
'~\\A[\\d/\S{0,3}]+\\z~'