pulling a value from a URL using regex

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
poindoink
Forum Newbie
Posts: 1
Joined: Mon Jan 21, 2008 11:15 am

pulling a value from a URL using regex

Post 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?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Re: pulling a value from a URL using regex

Post 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.
Post Reply