Test, validate and match regular expressions
This regex matches command-line arguments or flags that define a value for options like '-t', '--to', or '--t' (e.g., `-t value`, `--to=value`). It uses a positive lookbehind for 1 or 2 hyphens and captures the provided value in the first capturing group. It is particularly useful for parsing CLI inputs in Java applications where you need to extract specific parameter values.