Hi,
I have an Event Receiver which aims to ensure that the first letter of a word is a capital. I would like to use regular expressions, but I am new to it.
Here's the code. Basically, what I would like to happen is that the Event Receiver comes up if the word does not have a capital letter at its start in when entered in the DayNew column.
What regular expression code should I use? I have tried the below, but is doesn't work.
if (!string.IsNullOrEmpty(sDayNew))
{
if (!System.Text.RegularExpressions.Regex.IsMatch(sDayNew, @"^[a-z]$"))
{
properties.Cancel = true;
}
}
THANKS!
Zuke
zuke collins