Page 1 of 1

Inserting newline character

Posted: Sun Dec 20, 2009 9:47 pm
by gcotterl
My text-file contains rows that look like this:

WORLD892CNN200CNN800FOX NEWS CHANNEL205
FOX NEWS CHANNEL805G4191HEADLINENEWS202
MSNBC209NASA213RFDTV231

How do I insert a newline character between an alphabetic character and a numeric character?

Examples:

In "WORLD892", I want to add a newline character between "D" and "8".
In "CNN200", I want to add a newline character between 'N" and "2".

Posted: Sun Dec 20, 2009 10:36 pm
by ben_josephs
Find what: ([a-z])([0-9])
Replace with: \1\n\2

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax