OK, for way too many hours I have been trying to get this seemingly simple Perl compatible regex to work out, but I just can't seem to do it. I'm about to give up, move to a dark cave and shun computers for life. :(
The problem:
I have a string that is looking something like this: /a/b/c/d/ the string can be just /a/ or it can be /a/b/..../z/ very long.
I would like to catch all the various bits in this string [ /a/b/c/d/ ] as follows: $1 = /a/ $2 = b/ $3 = c/ $4 = d/
and so on for each added bit. The bits in between the "/" contains mainly [alphnums].
I've tried every regex version of this that I can think of and most don't return a damn thing, and others return the wrong things. A few days ago I thought I got this regex stuff, but now I'm in serious doubt.
I know that I can workaround the problem by doing other things, but it's become a bit of a burden on my mind. I'd like to know where I'm going wrong 'cause I can't see it at the moment and that drives me mad.
Extremely over the top grateful for any help. :)
Kind regards,
Mats
---- "TextMate, coding with an incredible sense of joy and ease" - www.macromates.com -