I think that with those new elements
Hofmator is right,
regexes aren't probably the good solution.
Especially with other simple answers available like :
print join'/',grep{if(!$u{$_}){$u{$_}=1}}split'/',$data;
Note to hofmator: don't hit me too hard...
My (poor) regex was not meant to be a solution but rather to show a
possible way to study
(wasn't approach bold enough ? ;-)
Anyway I++ your post beccause your rightly outline some of the problems that may arise with the regex approach...
and in particular in my poor regex approach
"
Only
Bad
Coders
Code
Badly
In
Perl" (OBC2BIP)