views:

87

answers:

2

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 !

A: 

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

henasraf
+2  A: 

This URL plugin would let you do this:

alert($.url.param("txt"));

(it's only 0.76kb, minified)

karim79