-
[RESOLVED] Regular Expression Solution
I am pulling a URL from the address bar and parse it down until I get this
(The 'sortby' changes so I have to detect it dynamically)
sortby=industry&tuition=true
OR
sortby=industry
I want this to return
tuition=true
OR
Nothing
This is the regex I am currently using. It works for one but not the other.
/(^sortby=)[A-Za-z|\_|\+|\W]{1,}&/
Thank you for you time!
Michael
-
The following regular expression should work:
/sortby\=[^&]+&?/
it looks for "sortyby=" followed by anything that is not a "&" character and in the end an optional "&" character.
Archie
-
Thanks Archie Worked Great!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks