Test, validate and match regular expressions
This regular expression matches relative time queries commonly used in logging and observability platforms like Splunk or Grafana. It starts with the literal string "now()", followed by optional arithmetic adjustments like "+1d" or "-2mon" to shift the time. Finally, it supports an optional snap-to-time operation using the "@" symbol (e.g., "@h" to snap to the beginning of the hour). It is typically used to validate time range syntax in search queries.