lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thomas Wrensch wrote:

You can use a different pattern and string.find rather than gsub

To find if the word contains a CamelCase string:

    function isCamelCase(str)
      return string.find(str,"%u%l+%u%l[%u%l]*")

(Note that this returns nil if not found and a digit if it is)

But wouldn't this pattern allow for AlexSaNDRO to be computed as a camel case word?