Sunday, 15 January 2012

regex - Specific Regular Expression In Javascript with a condition -



regex - Specific Regular Expression In Javascript with a condition -

this question has reply here:

how can query string values in javascript? 73 answers parsing url in javascript 3 answers

how format regular look in javascript :

http://localhost:3000/sales?&tp=home+stay&am=pool&pl=1620&pt=flash+sale&st=5

i want &pl= , digits after &pl=. result &pl=1620 in case. please help how perform this?? help means lot me.

this script trick:

var regex = /&pl=\d*/; var match = regex.exec(yourtext)[0];

javascript regex pattern-matching string-matching

No comments:

Post a Comment