I am trying to validate my text field with some regex pattern
here is the sample text
ABC-D-2013/07/15-1115
or
DEF-N-2012/07/15-2224, BOY-W-2018/05/16-4441
this is my code
If(
IsMatch(
e_url.Text,
"([a-zA-Z]+-[a-zA-Z]+-\d+\/\d+\/\d+-\d+(?:,\s*[a-zA-Z]+-[a-zA-Z]+-\d+\/\d+\/\d+-\d+)?)",
MatchOptions.Complete
),
Color.White,
Color.Red
)
I am trying to change the fill color to red if it doesn't match.
it is always red.
is the code right?