1.0 m = 60.00 s 2 day = 48 hour 5 year = ? day
where: 1) letter or string up to 15 characters; 2) a positive natural or real number. 3) instead of the 2nd digit there can be a '?' Character.
RegEx don't speak now, maybe someone can help?
1.0 m = 60.00 s 2 day = 48 hour 5 year = ? day
where: 1) letter or string up to 15 characters; 2) a positive natural or real number. 3) instead of the 2nd digit there can be a '?' Character.
RegEx don't speak now, maybe someone can help?
I do not know if I understood correctly. But here is the regular expression for the given strings:
^(\d+(?:\.\d{1,2})?)\s(m|day|year)\s=\s(\d+(?:\.\d{1,2})?|\?)\s(s|hour|day)$
Required with multiline flag in options.
You can check the correctness and test on this site systemtextregularexpressions.com
Here are the groups:
Source: https://ru.stackoverflow.com/questions/406873/
All Articles