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

Re: 7 bit ASCII codes.

#1 7 bit ASCII codes.

Posted by: hlk123 | Date: 10/19/2016 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: 10/19/2016 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: 10/20/2016 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 - 2018 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR