Regex help?
- From: "Smarta55 Chris" <smarta55ATcomcastDOTnet>
- Date: Sun, 26 Jun 2005 19:31:52 -0400
Can someone help me find the last n folders in a path,
or the last n OUs in a fully qualified Netware name... for an app object,
etc?
Example:
\\server\volume\share\folder\folder\folder
I want to grab just the last 2 folders (including or excluding the \s), but
sometimes there
are 3 folders after the share, like in the example, and sometimes there are
more.
Same for an app object in eDirectory
..appobject.dept.biz.site.county.state.tree
How to I grab just the .site.county.state.tree OUs?
Sometimes there are 5 OUs after the app object, and sometimes more.
I want, I think, to start at the end of the string, and grab everything
after the 4th dot from the end, but
don't have a clue how to code this.
I'm not a perl newbie, but I'm no expert.
Thank you,
Chris
.
- Follow-Ups:
- Re: Regex help?
- From: Jim Gibson
- Re: Regex help?
- Prev by Date: Re: summarize bytes
- Next by Date: Re: Regex help?
- Previous by thread: Re: Again: IPs of local Interface
- Next by thread: Re: Regex help?
- Index(es):
Relevant Pages
|
|