in reply to How to split CamelCase?

I like salva's solution but would extend it to allow for the processing of camelcased strings that begin with lowercase letters, e.g., "thisIsValidToo". <more in a minute>

Replies are listed 'Best First'.
Re^2: How to split CamelCase?
by warddav (Initiate) on Sep 19, 2007 at 12:30 UTC
    Sorry....meant to include

    /[a-z]+|[A-Z](?:[A-Z]+|[a-z]*)(?=$|[A-Z])/g

    as possible regex.