remove last XX characters in all line

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
hv
Posts: 2
Joined: Fri Nov 07, 2008 1:17 am

remove last XX characters in all line

Post by hv »

Hello all,

I was wondering if anybody knew how I would go about removing the last XX characters in all lines.

e.g. (last 10 characters in the following lines)
line 1 3658(&^^*^
line 2 *(^&*%sdf2
line 3 1%*&&^nkhj

would result in:
line 1
line 2
line 3
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: .{10}$
Replace with: [nothing]

[X] Regular expression

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

[X] Use POSIX regular expression syntax
hv
Posts: 2
Joined: Fri Nov 07, 2008 1:17 am

thank you...

Post by hv »

much abliged... thank you very much. this worked perfectly for my 800,000+ rows file.
Post Reply