^([^,]+?),([^,]+?),(Strawberry|Green)(.+)\n replace with XyZ&

Text | Process Lines Containing… XyZ and Copy to clipboard

Simpler solutions abound no doubt.

AB

> On 18 Sep 2019, at 10:50, mctamz <[email protected]> wrote:

> I was wondering if there is a way to extract certain lines which contain 
> certain strings from a specific column in a csv file?
> What I mean is, for instance, if there is a csv file of the following:
> 
> Canada,USA,France,Italy,Germany,Japan
> Apple,Orange,Strawberry,Banana,Pear,Mango
> One,Two,Three,Four,Five,Six
> Banana,Orange,Apple,Strawberry,Mango,Pear
> Blue,Yellow,Green,Red,Purple,Pink
> Uno,Dos,Tres,Cuatro,Cinco,Seis
> Red,Yellow,Pink,Purple,Green,Blue
> 
> I would want to extract the entire line which contains the string, 
> "Strawberry" and "Green"  on the third column. 
> The result would be:
> 
> Apple,Orange,Strawberry,Banana,Pear,Mango
> Blue,Yellow,Green,Red,Purple,Pink
> 
> 
> Is there a way of using regex?

-- 
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://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/DED0162E-666B-40E7-9BD7-8C428B6FBA96%40c18.org.

Reply via email to