$string = "s005219/Doe John|John.Doe\\";
$string = ~/s\d+\/([^|]*)/;
print $1
Assumptions:
- each string starts with an 's' then a number
- the number is a decimal integer
- There will be no | character in the name
It can be simpler than this and remove the limits of assumption 1 and 2, excercise left for the OP.
Cheers,
R.
Pereant, qui ante nos nostra dixerunt!