Notepad ++ Replace All Regular [removed]Start of the line and End of the line)

后端 未结 7 822
一生所求
一生所求 2021-02-07 10:09

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
464         


        
相关标签:
7条回答
  • 2021-02-07 10:34

    if you mean replace same as insert ( on start of the line, just using this following easy step:

    Type:

         ^
    

    in "Find what" box.

        (
    

    in "Replace with" box.



    Hints:
    http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Editing_Configuration_Files

    0 讨论(0)
  • 2021-02-07 10:36

    This will work in Notepad++ : before doing replace steps, first copy text to notepad, then copy text from notepad to notepad++,

    Search -> Replace Search Mode -> Regular expression Find What: ^ Replace with: ( Click Replace All

    0 讨论(0)
  • 2021-02-07 10:37

    I don't know why you are having problems.

    This works for me in Notepad++ v6.2:

    Search -> Replace
    Search Mode -> Regular expression
    Find What: ^
    Replace with: \(
    Click Replace All
    
    0 讨论(0)
  • 2021-02-07 10:38

    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.

    0 讨论(0)
  • 2021-02-07 10:40

    I do not have the rep points to add a comment...

    @MrBones

    replacing "\n" also needs "\n" as the beginning of the "replace with" so that the file still has \n instead of only "\r".

    so for Notepad++

    Find what:\n Replace with:\n(

    0 讨论(0)
  • 2021-02-07 10:53

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

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

    0 讨论(0)
提交回复
热议问题