I’m creating a site using asp.net and C# and i just need to know some regex to validate/highlight my gridview.
I need to highlight these cells in their own columns:
1- APR, MAR, etc. (three letters exactly)
2- 2011, 2012, etc. (year)
3- blank cell in gridview
Some links/tutorials on basic regex would also help me.
[A-Z]{3}\d{4}For 1, you could also use
(JAN|FEB|MAR|APR|...)(you get the idea). Also, if you wanted to match all Unicode letters, you could swap[A-Z]with\pL.If you didn’t want these matched midstring, add a word boundary (
\b) on each side.