Solved

parse path in pcre help

Posted on 2006-10-27
2
208 Views
Last Modified: 2011-08-18
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,
0
Comment
Question by:modish
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 17820397
(^\\(\\([^\\]*)){3})(.*$)
0
 

Author Comment

by:modish
ID: 17825088
Hmmm ,
Obvious :-)
Thanks Ozo.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now