[Help] using regex

bzy39

Regular Member
Joined
Jan 15, 2009
Messages
438
Reaction score
243
help me to rename or to remove google news url in this regex

HTML:
http://news.google.com/news/url?fd=R&sa=T&url=http://www.presstv.ir/detail.aspx?id=106989&sectionid=351020104&usg=AFQjCNGBRlMb3AeBvxb24vx46rvbe9EgzA
to

HTML:
http://www.presstv.ir/detail.aspx?id=106989
i have try using this regex

\b(https?)://[-A-Z&@#/%?=~_|!:,.;]*(url)=

but it only remove

HTML:
http://news.google.com/news/url?fd=R&sa=T&url=
i'm new in regex :rolleyes:

thank
 
This is better:

Code:
/url=(.*)/
I threw together a quick regex that does the job

pattern:
/^.*\&url=((http://%29*%28https://%29*%28www%5C.%29*%28[A-z])+\.([A-z]{2,4})+(\/[A-z,0-9]+\.)([^\&])*).*/

replace with
$1
 
thank all, i will try it
 
Back
Top