Jan,

both <img src="(.*)".+?/> and <img src="(.*)"[^>]+/> have a "(.*)" that matches 
the longest string, ie from the first " in the line to the last " in the line.

What you want is something like this: <img src="([^\"]*)".+?/>

Jean-Christophe 

> On May 12, 2019, at 21:26, Jan Erik Moström <[email protected]> wrote:
> 
> I want to a simple search on a text like this
> 
> ---------
> <img src="uploads/2019/03eaa90fb4.jpg" width="600" height="600" alt="" /> 
> lkhlkhl
> 
> <img src="uploads/2019/03eaa90fb4.jpg" width="600" height="600" alt="" />
> 
> <img src="uploads/2019/03eaa90fb4.jpg" width="600" height="600" alt="" /> 
> <img src="uploads/2019/03eaa90fb4.jpg" width="600" height="600" alt="" />
> 
> ---------
> 
> where I want to pick out the file paths, in other words four matches.
> 
> I first wrote this expression "<img src="(.*)".+?/>" but it matches both 
> items on the last lines (I don't understand why). I changed it to "<img 
> src="(.*)"[^>]+/>" but with the same result.
> 
> What am missing?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/67696A16-65C6-4D3E-82E5-8301B961E81D%40gmail.com.

Reply via email to