Page 1 of 1

removing Title Case

Posted: Wed Mar 11, 2009 3:15 am
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?

Re: removing Title Case

Posted: Wed Mar 11, 2009 10:40 pm
by DataMystic Support
Try the EasyPattern:

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

This finds a title cased phrase.

Re: removing Title Case

Posted: Thu Mar 12, 2009 5:19 am
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?

Re: removing Title Case

Posted: Thu Mar 12, 2009 8:36 am
by DataMystic Support
Sorry - check the Match Case option as well.

Re: removing Title Case

Posted: Fri Mar 13, 2009 1:24 am
by nargiz
I did. I get the above mentioned result with Match Case checked.

Re: removing Title Case

Posted: Fri Mar 13, 2009 8:41 am
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 ]