1

i hat one task, and know i have to continue but have a bad experience with regexp ... :(

can somebody help me :

i need to take a sting from "domain url" with jquery :

This is the address name :

http://mydomain/Our-Company/default.aspx?txt=James D. Perrlo

I want to take with jquery la string after "?txt=" in this case "James D. Perrlo"

PS: This string always is ends of the url

Can somebody help me ?

Thanks !

0

2 Answers 2

3

This small URL plugin lets you do this:

var url = $.url('http://allmarkedup.com/folder/dir/index.html?item=value');
url.attr('protocol'); // returns 'http'
url.attr('path'); // returns '/folder/dir/index.html'

https://github.com/allmarkedup/jQuery-URL-Parser

Sign up to request clarification or add additional context in comments.

2 Comments

@karim79 do you have a copy of this plugin? The site seems to be down from a long long time.
New link is alive :) Thanks for commenting.
0

/.+\?(.[^&]+)/ should do the trick.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.