Inserting newline character

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
gcotterl
Posts: 255
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Inserting newline character

Post 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".
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
Post Reply