You are not logged in.
Hello everyone,
I have a badly formatted CSV: beside other things, the comma is both the decimal separator and the cell separator.
Now, the easiest way that came to my mind about how to fix it was: let's find all commas that are between numbers and make those a dot. Then, convert the rest in semicolon.
So I tried searching with geany (regex on) for [0-9],[0-9], and of course it finds them all, but what should I put in the "replace" field to replace just the comma with a dot, as it selects the whole 3 chars? I've been searching for a while, can't find it.
Thanks!
EDIT: I found it myself, sorry for being a noob, still have to learn about the indepths of regex.
The way I've done it has been searching for ([0-9]),([0-9]) and replace with \1.\2
Last edited by devnull (2019-05-25 09:48:12)
Offline
Hey devnull,
Thanks for posting this here (with the answer you found!).
I use geany quite often and cam across similar problems from time to time.
I tend to use sed in this case but it is not satisfying, so i will give this a try.
naik --greetz
"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg
Offline