Find non-uppercase printing characters for abbreviations

General comments and questions. Technical support.
Post Reply
Alan
Posts: 274
Joined: Wed Jul 24, 2002 11:57 am
Location: TN USA

Find non-uppercase printing characters for abbreviations

Post by Alan »

Is there a way to do a Find string for a printing/visible character that is not uppercase?
I currently search for (.)(^32)(^L) which finds abbreviations followed by words starting with a lowercase letter. Yesterday I thought if I could do "not uppercase" I could expand the search to include other conditions that I treat the same [)"?!...]. I quickly found [!^U] includes white space as non uppercase which my text is filled with.

Alan
Atlantis 5
Windows 11 Pro for Workstations
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

It is hard to suggest a good regular expression without knowing what text you want to search and for which items.

[!^U^w] matches a non-uppercase and non-"white_space" character.

<[!^U^w]@> matches a shortest possible string of non-uppercase and non-"white_space" characters whose beginning is a "beginning of a word" and whose end is a "word end".

<[!^U^w]{1,}> matches a longest possible string of non-uppercase and non-"white_space" characters whose beginning is a "beginning of a word" and whose end is a "word end".
Alan
Posts: 274
Joined: Wed Jul 24, 2002 11:57 am
Location: TN USA

Post by Alan »

Hi Admin,
I am trying to find the string ". ^L" where the period belongs to an abbreviation and replace the space [^32] character with a non printing character to mark this as an abbreviation. I current look for all end of sentence characters followed by a space [^32] and lowercase letter [^L].

Alan
Atlantis 5
Windows 11 Pro for Workstations
User avatar
admin
Site Admin
Posts: 2926
Joined: Wed Jun 05, 2002 10:48 pm
Contact:

Post by admin »

You can try this expression:

Code: Select all

&#40;.&#41;&#40;^w&#41;&#40;&#91;!^$^#&#93;&#123;0,&#125;^L&#41;
^w ("white space") matches a continuous sequence of spaces or tab characters.

[!^$^#]{0,} matches 0 or more non-letters and non-digits.
Alan
Posts: 274
Joined: Wed Jul 24, 2002 11:57 am
Location: TN USA

Post by Alan »

Thanks Admin for the expression. It looks like this should work for me.

Alan
Atlantis 5
Windows 11 Pro for Workstations
Alan
Posts: 274
Joined: Wed Jul 24, 2002 11:57 am
Location: TN USA

Post by Alan »

Hi Admin,
The expression does work. I use various space characters (whitespace ^w) to markup text which leads to many results in previously edited text. I noticed something you did with that expression that I had not realized and came up with the following that works on both fresh text and edited text.
(.)(^32)([!^w^U])
The above gives me a period followed by a space that then has any printing character that is not upperccase.

Alan
Atlantis 5
Windows 11 Pro for Workstations
Post Reply