timeAgoRegExp top-level property
Regex to parse "N unit ago" strings (e.g., "5 minutes ago").
Captures the numeric value and the unit word, is case-insensitive.
Implementation
final RegExp timeAgoRegExp =
RegExp(r'^(\d+)\s+([a-zA-Z]+)(?:\s+ago)?$', caseSensitive: false);