Question

Am garbing news from out sources, and most of the images are linked to the original source today. My problem, some of the images source link look like this:

<img src="http://www.el-balad.com/upload/photo/news/78/1/360x232o/319.jpg?q=1" width="360"/>

How to use regex in yahoo pipe to make this link to look like this?

<img src="http://www.el-balad.com/upload/photo/news/78/1/360x232o/319.jpg"/>

The thing I need to change is:

.jpg?q=1&w=360&h=150&zc=1

To

.jpg
Was it helpful?

Solution

You can use replacing :

replace \?.* by \"

If you want to select on the img src link

You can use the following code :

  (?<=img src=)[^ ]*\" 

then you can replace \?.* by \"

Refer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top