tags:

views:

680

answers:

3

Hello, I am tryin to Replace the start of line with a "(". However when i use replace all i'm not able to do so.

For eg:

432425\n
4254645\n
w4546746\n
46457367\n
4765756\n

I want the output as using Replace All So i use the ^ symbol with Regular Expression Selected and Replace All.

Using only Replace works fine.

(432425\n
(4254645\n
(w4546746\n
(46457367\n
(4765756\n
+2  A: 

Not a solution, but a workaround:

Instead of using Regex's you can use the notepad++ macro feature to record keystrokes and then replay until the end of the file...

  1. Put cursor in front of first line
  2. Start recording
  3. Type a (
  4. Press down and left on your keyboard
  5. End recording

Replay to end of file

Easier if you don't know Regex's.

JD
@JD: I haven't tried this. Yet, it seems to be a good way. +1
shahkalpesh
+2  A: 

A workaround: find ^(.) and replace with (\1.

It seems like a Notepad++ bug to me.

Brian McKenna
A: 

If you are using notepad++, don't bother with the regex.

Instead, use the extended search mode to replace all \n with (

MrBones