Dani
Dani

Reputation: 79

Notepad++ : Insert blank new line after match of some string

I want to insert new line after (4) option in whole document in notepad++

  1. For his alleged involvement in
    espio-nage
    (1) abc
    (2) sdf
    (3) asf
    (4) agg
  2. When the Principal was entering
    the class, all my friends quietly...
    (1) dfg
    (2) hsc
    (3) sdg
    (4) fse

Below expression is not working.
Find what: ^.+(4)
Replace with: \n$0

Upvotes: 3

Views: 2628

Answers (1)

Ildar Akhmetov
Ildar Akhmetov

Reputation: 1431

Should be like this.

Find: (\(4\).+)

Replace: $1\n

Keep in mind that the brackets ( and ) have a special meaning in regex, so you should escape them with \.

Upvotes: 4

Related Questions