Sorry, I used the kind of regex I’m used to from vim,
and they do not necessarily work with sed, or perl, or
whatever. (But usually, the differences are small.)

Tools like sed (or awk, etc.) really help with this kind of task.
It is simple, and this tool tells us simple problems
like this do have a simple answer.

I just set up a small file with lines like
"123,456","8,126","7,541"
and did (always producing a new file, checking
intermediate results;
you’ll want to do it in place: sed --in-place)
sed 's/\([0-9]\),\([0-9]\)/\1\2/g' <tst.dsv >tst_.dsv
sed 's/"//g' <tst_.dsv >tst_a.dsv
… and that line became
123456,8126,7541


Am 18.02.21 um 12:05 schrieb R.E. Boss:
> Unfortunately, I don't read regex(?)
> 
> 
> R.E. Boss
> 
> 
> -----Original Message-----
> From: Programming <programming-boun...@forums.jsoftware.com> On Behalf Of 
> Hauke Rehr
> Sent: donderdag 18 februari 2021 12:01
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] csvedit
> 
> do you count
> s/\(\d\),\(\d\)/\1\2/g
> s/"//g
> as a lot of tailor made pre-processing?
> (I assume the /numbers/ are quoted,
> not the separators which would make
> it even simpler: s/","//g)
> 
> Am 18.02.21 um 11:55 schrieb R.E. Boss:
>> Actually, my question is: I have a comma separated file which contains 
>> numbers with a comma as thousands separator, enclosed between double quotes 
>> (").
>> How can I read these, without doing a lot of tailor made pre-processing?
>>
>>
>> R.E. Boss
>>
>>
>> -----Original Message-----
>> From: Programming <programming-boun...@forums.jsoftware.com> On Behalf 
>> Of bill lam
>> Sent: donderdag 18 februari 2021 11:31
>> To: Programming forum <programm...@jsoftware.com>
>> Subject: Re: [Jprogramming] csvedit
>>
>> I think this addon depends on another grid addon which had been decommited 
>> many years ago.
>>
>> On Thu, Feb 18, 2021, 6:22 PM R.E. Boss <r.e.b...@outlook.com> wrote:
>>
>>>
>>> Where has https://code.jsoftware.com/wiki/Addons/tables/csvedit  gone?
>>> I could only find it in \j64-602\addons\tables\csvedit
>>>
>>>
>>> R.E. Boss
>>> ---------------------------------------------------------------------
>>> - For information about J forums see 
>>> http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> 
> --
> ----------------------
> mail written using NEO
> neo-layout.org
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 

-- 
----------------------
mail written using NEO
neo-layout.org

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to