2👍
✅
Each regexp group within ()
is being passed to GetData()
as an argument. If you don’t want groups to be generated by some of them, but still want to use parens, use (?:whatever)
for non-grouping parens.
EDIT: You probably want something like:
('^GetData/((?:0?[1-9]|[12][0-9]|3[01])[- /.](?:0?[1-9]|1[012])[- /.](?:19|20)?[0-9]{2})*',GetData)
Source:stackexchange.com