ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Arranges in a txt file

<< < (3/4) > >>

Contro:
You could try CSV Editor that has a lot of options specifically for csv files, also available in a Unicode-edition, and on top of that is free software :)
-Ath (August 12, 2012, 12:11 PM)
--- End quote ---

Freeeetryinngggg

Best Regards

Contro:
Not bat, but I think CSV Editor is slow.

 :-[

Any other idea ?

Best Regards

eleman:
Open the file in notepad (or word, or any text editor you like). Get to search and replace function (ctrl-h usually).
Replace all instances of   ,   with    ","
Adjust spaces as you like.
-eleman (August 12, 2012, 10:21 AM)
--- End quote ---

and the commas at the beginning and the end ?

-Contro (August 12, 2012, 05:08 PM)
--- End quote ---

uh... there were none in your sample text :)

4wd:

and the commas at the beginning and the end ?

-Contro (August 12, 2012, 05:08 PM)
--- End quote ---

uh... there were none in your sample text :)
-eleman (August 13, 2012, 12:17 AM)
--- End quote ---

I think he meant the quotes inserted at the start/end.

I'm pretty sure this could be done using regex but it's beyond my meagre knowledge.  I managed to get the quotes inserted but I couldn't get rid of the extraneous spaces.

eg. Using Online RegEx Editor:

Arranges in a txt file

Pressing RegexSplit will give: "first",    "second","third","fourth"

AbteriX:

--- Code: Text ---FROM:first field,    second word, third column,  fourth itemTO:first field,second word,third column,fourth item Use RegExFind: ,\s+(\w)Repl: ,\1


--- Code: Text ---FROM:first field,second word,third column,fourth itemTO:"first field","second word","third column","fourth item" Use RegExFind: ^(.+?),(.+?),(.+?),(.+)$Repl: "\1","\2","\3","\4"

At least this works with EmEditor.
For other regex engines the patter may slightly different.
And often "$1" is used instead of "\" .

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version