You are here: PSPad forum > English discussion forum > 7 bit ASCII codes.

7 bit ASCII codes.

#1 7 bit ASCII codes.

Posted by: hlk123 | Date: 2016-10-19 17:44 | IP: IP Logged

Hello

I've a Textfile.
I want to delete all characters which don't belong to "7 bit ASCII" codes (see below) ...i.e. US keyboards.
Can PSPad help me to do it?
How?
Thank you.

!"#$%&'()*+,-./0123456789:<=>?;
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
`abcdefghijklmnopqrstuvwxyz{|}~

Options: Reply | Quote | Up ^


#2 Re: 7 bit ASCII codes.

Posted by: pspad | Date: 2016-10-19 18:17 | IP: IP Logged

Yes, it can. Use search/Replace and regular espressions.
You can define search expression as range of ascii values and replace all above the range.
Or you can simple create set of char you want in search expression

Options: Reply | Quote | Up ^


#3 Re: 7 bit ASCII codes.

Posted by: hlk123 | Date: 2016-10-20 16:05 | IP: IP Logged

Hello

I use RE for the first time.
I read PSPad's explanation about RE.
I tried several commands to define search expression as a range of ascii values and replace all others.
These are the results.

Search: [^a-z0-9 !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~] .... matches all NOT 7bitASCII

BTW why is [^\x00-\x7F] a mistake?
Thank you.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR