Discussion in 'BlackHat Lounge' started by agag2, Sep 16, 2011.
Anyone know how to do this?
(I'm talking about thousands of lines)
I would just use a macro to click to the beginning of the next line and paste a quotation, then repeat for the end of the lines.
I suppose you could also pay some rube to do it for you for a few cents or something. But a macro seems easier/cheaper.
Inbult macros (note pad AA+) or something like winautomation?
If your text editor allows searching for special characters like \r and \n, then you can do a search-and-replace for
and replace it with
\r\n indicates a line break, so running the search and replace will first replace it with a " (adding it to the end of the line), then do a line break, then add another " (adding it to the beginning of the line).
You will just have to add quotes to the beginning of the first line and the end of the last line. If \r\n doesn't work, just use \n
Search Mode for this in Notepad++ is "Extended." Different settings will apply to different programs.
EditPlus with a keyboard macro...
HOME to start of line
Ctrl-Q to start recordnig macro
" then END to end of line, then another ", then HOME to start of line and DOWN to next line
Ctrl-Q to end macro record
Then Tools->Record->Playback Multiple
Select macro and click stop at end of file
Done in a few seconds.
Any keyword/mouse macro is what I use for jobs like this. Tasker type programs. I just set and walk away from keyword for a bit, then come back and check my work.
thanks - great answer
is there any way to move the quote to the end of the line instead of the next line?
That should do what you want it to do, given I understood your OP correctly.
Say your file has this:
Search-and-replace would make it this:
And you just have to add " to the beginning of line 1 and end of last line.
If I don't have access to notepad++ I use this http://textmechanic.com
Here is the part that you need: http://textmechanic.com/Add-Prefix-Suffix-to-Text.html
Just paste your lines into the box above, add suffix ", add prefix " and click add.
Macros are overkill for this.
Just do a search-and-replace for this, like artizhay recommends.
Yeah Notepad++ is set to default text here. Get it, it's free. The extended and regex options for replacing a huge time saver. Also has some great built in options to save time..
Separate names with a comma.