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 certainly not the quickest...

function ExtractCamelCase pText
  local tToken,tCamelCaseList
  -----
  repeat for each token tToken in pText
    if the number of words of tToken > 1 then next repeat
if charToNum(char 1 of tToken) < 65 or charToNum(char 1 of tToken) > 122 then next repeat
    repeat with i = 2 to the (number of chars of tToken - 1)
if charToNum(char i of tToken) > 64 and charToNum(char i of tToken) < 91 and tToken is not among the lines of tCamelCaseList then
        put tToken & cr after tCamelCaseList
        next repeat
      end if
    end repeat
  end repeat
  delete last char of tCamelCaseList
  sort tCamelCaseList
  return tCamelCaseList
end ExtractCamelCase

Le 29 août 05 à 13:09, david bovill a écrit :

What's the quickest way to find all the CamelCase words in some text - anyone have a regular expression or script for this?

Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        [EMAIL PROTECTED]/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to