Since Textpad seems to have only very limited regex support, I only got it done with three replaces:
Replace each newline (
\n
or\r\n
) in your text with a unique pattern, e.g.##NEWLINE##
Use the regex
(Hello).*(World)
and replace the match with\1 \2
(you can also just useHello.*World
and replace withHello World
)Finally, revert step 1 by replacing all
##NEWLINE##
with the actual newline
I suggest taking a look on Notepad++ which has better regex support, a lot of other features (especially for source code editing), and is open source / free software.