Page 1 of 1

pulling a value from a URL using regex

Posted: Mon Jan 21, 2008 11:24 am
by poindoink
I'm trying to pull a value from a URL like this:

url/section/subsection

I want to pull "section" from it, whatever that may be. What's the best way to do it?

Re: pulling a value from a URL using regex

Posted: Mon Jan 21, 2008 2:08 pm
by Oren
Your subject string is not going to be constant... I believe, so please give us the pattern of the URL you will be working with and not just one, very specific, example.