View Single Post
Old 07-21-2011, 08:36 AM   #15
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by scubaddictions View Post
Yeah, I know that there are other text editors that do Regex, and I already have Notepad++. The problem is that the syntax of a Regex in one text editor doesn't work in Notepad++, or any of the other text editors I've tried. I'm almost certain that this particular Find/Replace function will work in Notepad++ if I can just get the syntax correct. Any help on that front would be appreciated.
Hi Ryan,
If you want a Notepad++ equivalent to your UltraEdit solution, I believe the following will work. It's a multi-pass operation.

First, choose a short text string which doesn't occur elsewhere in your text file. I'm using ~~~ in my example.
  1. Regex mode, with Match case checked
    Code:
    Find: ([a-z])$
    Replace: \1~~~
  2. Extended mode
    Code:
    Find: ~~~\r\n
    Replace: singlespace 
  3. Regex mode, with Match case checked
    Code:
    Find: ^([a-z])
    Replace: ~~~\1
  4. Extended mode
    Code:
    Find: \r\n~~~
    Replace: singlespace 

I believe Notepad++ also has a better macro system these days, so perhaps the above 4 commands can be wrapped up as a single macro. I haven't tried this, though.

I hope this helps you save your money

Last edited by jackie_w; 07-21-2011 at 08:38 AM.
jackie_w is offline   Reply With Quote