I am stil struggling with understanding how Regex works exactly.
I am getting usernames and they are in this format:
firstname.lastname
Both names may contain special international characters and they may contain an ' or - but I just need to detect if they contain any uppercase letters so I can throw an exception.
I am using this expression
[^A-Z].[^A-Z]
It seems to me that this should work, I just don't understand why it doesn't.
I hope somebody could explain.
Thanks!
if(yourString.Any(char.IsUpper)) {...}
– Award