Skip to content

Split string by capital letter. #4

@wlwl2

Description

@wlwl2

https://stackoverflow.com/questions/1097901/regular-expression-split-string-by-capital-letter-but-ignore-tla

((?<=[a-z])[A-Z]|[A-Z](?=[a-z]))

Unicode-aware:
((?<=\p{Ll})\p{Lu}|\p{Lu}(?=\p{Ll}))

handles:

TodayILiveInTheUSAWithSimon
USAToday
IAmSOOOBored

yielding:

Today I Live In The USA With Simon
USA Today
I Am SOOO Bored

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions