You've gotten some good answers about how to do precisely what you say you
want to do, and that's great.

I'm curious, though, if you might want something different. When you're
working with a CSV, enclosing a field in double-quotation marks
preserves/respects the commas within that field. If you remove the commas
completely, or replace the commas with something else, as you've requested,
it will degrade the quality of your data. (That might not matter to you in
this case.)

So instead of finding everything between "ArtToCanvas" and
"ArtToCanvas,prints" and removing the commas from it, I'd find the first

ArtToCanvas,

and replace it with

ArtToCanvas,"

and then find the second

,ArtToCanvas

and replace it with

",ArtToCanvas

Hope this helps.
--Kerri

On Mon, Jun 3, 2019 at 9:34 AM Aethon <[email protected]> wrote:

> I have a big file that I had exported from the office as a CSV (forgetting
> that I had done the first part a while back as tab-separated).
>
> So now I have a list where some of the text columns contains commas and
> this throws the whole structure/order off.
>
> Here is a sample of the data.
>
>
> home,ATC-Sea-Serpents-by-Gustav-Klimt,ArtToCanvas,*54W x 27H inches : Sea
> Serpents by Gustav Klimt*,ArtToCanvas,prints,319,,,1,
> https://arttocanvas.com
> home,ATC-Gold-Swirls-by-Lisa-Kowalski,ArtToCanvas,*30W x 40H inches :
> Gold Swirls by Lisa Kowalski*,ArtToCanvas,prints,269,,,1,
> https://arttocanvas.com
> home,ATC-Blue-Green-and-Brown-by-Mark-Rothko,ArtToCanvas,*26W x 32H
> inches : Blue, Green, and Brown by Mark Rothko*
> ,ArtToCanvas,prints,219,,,1,https://arttocanvas.com
> home,ATC-La-seperazione-dell-atomo-by-Salvador-Dali,ArtToCanvas,*50W x
> 26H inches : La seperazione dellatomo by Salvador Dali*
> ,ArtToCanvas,prints,299,,,1,https://arttocanvas.com
>
> Now, what I want is to replace the commas from the centre column (in bold).
>
> I had use a grep search like the following :
>
> ArtToCanvas,(.+),ArtToCanvas,prints
>
>
> to select the correct information—but I don't know to do a further
> replacement of the commas when I output the \1.
>
>
> Is this even possible using  Bbedit Grep?
>
> I have version 10.5.3
>
> Thanks,
> George
>
> --
> 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/e548236e-c87a-4c5c-9544-7c46b8588ada%40googlegroups.com
> <https://groups.google.com/d/msgid/bbedit/e548236e-c87a-4c5c-9544-7c46b8588ada%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAEmA4uYt5QBHG3ayKc6cHFCUpcD3wGr_f4TFM_KxUYQ2x%2BSLcQ%40mail.gmail.com.

Reply via email to