0

I have a huge text files with date strings in the first column. For further processing, I need to have the date strings in double quotation marks:

2015-11-11 00:00:00.00,59,...

Should end up like this:

"2015-11-11 00:00:00.00",59,...

I am using NotePad++ and my attempts to find and replace using wildcards have not resulted in a specific enough solution such that the end quote sometimes ends up in the wrong column. Here is what I was using:

Find: 2015-.*0,

Replace: "2015-.*0",

What would the best way to this be in NotePad++?

1 Answer 1

1

Just give this one a try:

\b\d{4}(-\d\d){2} (\d\d:){2}\d\d\.\d\d

I guess (hope) it's not too dense to be readable.

I forgot the replace expression. It should be:

"$&"

Where $& represents the whole string the regexp matched against.

1
  • That worked perfectly! Thanks for the quick response!
    – Buzz
    Mar 18, 2016 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .