B
B
brar2016-10-24 14:19:54
Perl
brar, 2016-10-24 14:19:54

Adding text to all cells of a specific column in csv and also removing specific characters?

Good afternoon. There is a CSV:

A, B, C, D,
bla, ghd, gfg, $11,
sfw, dfs, mbh, $14,
...
kjg,ef,efwe,$5

where A, B, C, D are the names of the columns. And in cells arbitrary values ​​/ text.
Tell me, please, how can I add a certain word SLOVO to all cells of the first column? And remove the $ sign from the fourth column.
A, B, C, D,
SLOVObla, ghd, gfg, 11,
SLOVOsfw, dfs, mbh, 14,
...
SLOVOkjg, ef, efwe, 5

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Olgeir, 2016-10-24
@Olgeir

\^(.*)$\SLOVO$1\
\^(.*,)\$?([^,]*)$\$1$2\

B
brar, 2016-10-24
@brar

Perl tormented me for a long time. But because he couldn't.
Made ugly and on the forehead:
Thanks to all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question