Search code examples
regexeditplus

Next Capital letter using Regex Search


I use EditPlus.

This tool has a nice search option where you can search either regular text or RegEx search.

I want to search for the next Uppercase alphabet preceeded by a lowercase alphabet. What do I put in the search box for this?


Solution

  • [A-Z][a-z]+ should do it.

    Translation: Exactly one capital letter, followed by one or more lowercase letters.

    Edit: I had the relationship backwards:

    [a-z]+[A-Z]+

    Translation: One or more lower-case letters, followed by one or more upper-case letters.