I have heard perl is a good language at doing regex but i am a bit confused at the characters that requires escaping
I tested the code on http://regexlib.com/RETeste
You can choose use ! instead of / to surround your regular expression so that you don't have to escape the /.
!
/
m!//home/dev/((.*?)/[^/]+).*#!
should work. Here's it in action: http://ideone.com/TDrBG