I'm attempting to open an .mdi file in textpad, when I do I can see all the valid text that I want in page size chunks, seperated by all the special characters that conatin the .mdi formating.
How can I go about marking either set of lines?
I know that I want to identify all the lines that are only a-z, A-Z, 0-9 and/or punctuation against those containg at least character that is 'special.'
Can I do this by ANSI value? - It appears that the lines I don't want will have at least one character that is ANSI 191 or higher (except maybe 215 & 247)
Any ideas where I should start?
I did try to cut & paste some example lines into this post, but the preview wouldn't work - must be those 'special' characters!
Many thanks.
Lines without 'special' characters.
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Crispy seems to be looking for fine control over which characters are to be treated as special.
The special characters as Crispy has defined them can be found with the regular expression
[¿-ÖØ-öø-ÿ]
That expression can be used to find lines that contain any special characters.
The non-special characters can be found with
[^¿-ÖØ-öø-ÿ]
(Non-empty) lines that contain only non-special characters can be found with
^[^¿-ÖØ-öø-ÿ]+$
The special characters as Crispy has defined them can be found with the regular expression
[¿-ÖØ-öø-ÿ]
That expression can be used to find lines that contain any special characters.
The non-special characters can be found with
[^¿-ÖØ-öø-ÿ]
(Non-empty) lines that contain only non-special characters can be found with
^[^¿-ÖØ-öø-ÿ]+$