The following returns true
Regex.IsMatch("FooBar
", "^([A-Z]([a-z][A-Z]?)+)$");
so does
Regex.IsMatch("FooBar
", "^[A-Z]([a-z][A-Z]?)+$");
The RegEx is in SingleLine mode by default, so $ should not match
.
is not an allowed character.
This is to match a single ASCII PascalCaseWord (yes, it will match a trailing Cap)
Doesn't work with any combinations of RegexOptions.Multiline | RegexOptions.Singleline
What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…