Build, test, and debug regular expressions
This regular expression captures two parts of a range, such as a date or value range, separated by either a hyphen or the word 'to'. It uses named capture groups 'start' and 'end' to easily extract the respective boundary values. The 'i' and 's' flags ensure case-insensitive matching for the delimiter and allow the dot metacharacter to match newline characters within the captured groups.