parse path in pcre help

Hello
I am using a pcre module to write a stored procedure to parse a path of the following typ
\\one\two sdkfjlk#94(@!! \therkj @'jf \four\five\isc jkj\seven  .... etc
and I want to just get the path to the fourth level i.e everything between \\....\...\...\..\ or less

I have been trying
(^\\(\\([\s+|\w+]*)){3})(.*$)
but this is fine with
\\one two\three\four\five\ it has problems with #'! etc characters and I don't know how to express ( any char except \\ in the expression)

thanks,
modishAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ozoConnect With a Mentor Commented:
(^\\(\\([^\\]*)){3})(.*$)
0
 
modishAuthor Commented:
Hmmm ,
Obvious :-)
Thanks Ozo.
0
All Courses

From novice to tech pro — start learning today.