Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4916 RegEx .* does not work

Next_Major_Version
open
nobody
RegEx (3)
3
2014-07-15
2014-07-15
jmsallo
No

I was advised to try NotePad++. I am attempting to do something like this:

http://superuser.com/questions/398196/regular-expression-replace-in-textpad-where-search-term-spans-multiple-lines

with multiple "Hello World" groups, ie.

Hello
ab_c
D_EF
12_3
World
Hello
ab_c
12_3
World
Hello
ab_c
D_EF
12_3
45_6
World

Even when following the instructions on the sample page (putting everything on 1 long line with ##NL## replacement), NP++6.6.7 finds only the FIRST instance and deletes the rest of the line.

Discussion

  • Don't replace newlines with ##NL##.

    Open search and replace, check "Regular expression", check ". matches newline", replace

    (Hello).*?(World)

    with

    \1 \2