Regular expression help
- by DJPB
I there
I'm working on a C# app, and I get a string with a date or part of a date and i need to take day, month and year for that string
ex:
string example='31-12-2010'
string day = Regex.Match(example, "REGULAR EXPRESSION FOR DAY").ToString();
string month = Regex.Match(example, "REGULAR EXPRESSION FOR MONTH").ToString()
string year = Regex.Match(example, "REGULAR EXPRESSION FOR YEAR").ToString()
day = "31"
month = "12"
year = "2010"
ex2:
string example='12-2010'
string month = Regex.Match(example, "REGULAR EXPRESSION FOR MONTH").ToString()
string year = Regex.Match(example, "REGULAR EXPRESSION FOR YEAR").ToString()
month = "12"
year = "2010"
any idea?
tks