What's the quickest way to find all the CamelCase words in some text
- anyone have a regular expression or script for this?
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage
Hi David,
I use the following function.
It does not differentiate lower camelCase from upper ones (CamelCase).
As I use it to parse scripts, the text to parse is not too long and
it's enough for my "internal" needs.
But I imagine there are faster solutions :-)
It's certai
david bovill wrote:
What's the quickest way to find all the CamelCase words in some text
- anyone have a regular expression or script for this?
Depends on your definition of CamelCase !!
There are lots of variations possible
- must have leading Uppercase (aka UpperCamelCase)
- ma
Message: 5
Date: Mon, 29 Aug 2005 13:09:20 +0200
From: david bovill <[EMAIL PROTECTED]>
Subject: CamelCase
To: How to use Revolution
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
What's the quickest way to find all the C
What's the quickest way to find all the CamelCase words in some
text - anyone have a regular expression or script for this?
Hi David:
[^A-Za-z][A-Z][a-z]+[A-Z][A-Za-z]*
In words: Any character except an alphabetic one, an uppercase
character, one or more lowercase characters, an uppe
e return true
This IF statement can be replaced by one line: "return (not (toLower
(tText) = tText))"
>end thereIsAnInteriorCapitalLetter
This handler may or may not do Bovill's job, depending on what sort of
strings count as being CamelCase. A few test-cases:
"ge