title: How to match any uppercase letter followed by the corresponding lower case letter?
body: <p>I have a requirement that says a name must not start with 3 identical letters ignoring their case. A name starts with an upper case letter followed by lower case letters.</p>
  
  <p>Basically I could convert the whole name to upper case and then match with a regex like <code>(\p{Lu})\1{3,}.*</code>.</p>
  
  <p>But I was wondering if there exists a regex that matches the above requirements and does not need any preprocessing of the string to be matched. So what regex can I use to match strings like <code>Aa</code>, <code>Dd</code> or <code>Uu</code> without explicitly specifiying any possible combination?</p>
  
  <p><strong>EDIT:</strong><br>
  I accepted Markos answer. I just needed to fix it to work with names of length 1 and two and anchor it at the beginning. So the actual regex for my use case is <code>^(\p{Lu})(\p{Ll}?$|(?=\p{Ll}{2})(?i)(?!(\1){2}))</code>.</p>
  
  <p>I also upvoted the answers of Evgeniy and sp00m for helping me to learn a lesson in regexes.</p>
  
  <p>Thanks for your efforts.</p>