Regex to select everything up to a particular character in a URL -


How do I select all the characters with the regex from the following URL to 2 ?

  http: //localhost/web/gifts/index.php?list=tshirts&page=2http: // localhost / web / gifts /? Page = 2  

like

  http: // localhost / web / gifts /? Page = http: //localhost/web/gifts/index.php?list=tshirts&page=  

I would like to change the page number when I click on the next page button or any other page < / P>

  (. *) (? = \ B \ d + $)  < / Pre> 

It should do this See the demo. Cpature Catch.


Comments