removing Title Case

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
nargiz
Posts: 6
Joined: Tue Feb 03, 2009 2:07 am

removing Title Case

Post by nargiz »

I have another question for you. By the way, your support is awesome. I'm upgrading to Pro from Lite to perform certain tasks Lite can't do. Anyway, I'm struggling with removing Title Case (or all lower case) words from inside certain range where I have mix of UPPER CASE, Title Case, lower case words.

f.e.
within certain html code
<a>UPPER CASE, Title Case, lower, 123, lower</a>

I need to have left with
<a>UPPER CASE</a>

seems easy enough but ...
The order of upper case and lower case words within the <a> tag changes. But I understand htat should not be a problem.

thank you for your help,
N
ps. Can it be performed in Lite as well?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: removing Title Case

Post by DataMystic Support »

Try the EasyPattern:

[ upper, 1+ lower, 0 or more ( 1+ whitespace, upper, 1+ lower ) ]

This finds a title cased phrase.
nargiz
Posts: 6
Joined: Tue Feb 03, 2009 2:07 am

Re: removing Title Case

Post by nargiz »

Simon,

what it does is it removes the first two letters from each word of a title cased phrase.
In <a> UPPER CASE, Title Case, UPPER CASE, Title Case</a>
it leaves
UPPER CASE, tle se, UPPER CASE, tle se

it does not seem to recognize 1+ in "1+ lower" It interprets it as one upper and one lower. I tried changing 1+lower to 1+ lower chars it interpreted it as one upper and 2 lower, so in the above example it gave me:
UPPER CASE, le e, UPPER CASE, le e

On the other hand when in:
DataMystic Support wrote: [ upper, 1+ lower, 0 or more ( 1+ whitespace, upper, 1+ lower ) ]
I change 0 or more to 1or more it removes 1 whole title case word + first two letters of the next word...
i.e.
UPPER CASE, se, UPPER CASE, se
I hesitate to change 0 or more since the number of title case words varies.

Any ideas?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: removing Title Case

Post by DataMystic Support »

Sorry - check the Match Case option as well.
nargiz
Posts: 6
Joined: Tue Feb 03, 2009 2:07 am

Re: removing Title Case

Post by nargiz »

I did. I get the above mentioned result with Match Case checked.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: removing Title Case

Post by DataMystic Support »

Sorry, I reaxmined your original request and tested out the pattern:

Code: Select all

[ upper or lower or digit, longest 1+ lower or digit ]
Post Reply