I have this snippet of a code..
(r'^-?[0-9]+(.[0-9]+)?$', 'CD')
which is obviously a regular expression. But I can't interpret its meaning?...what is it referring to?
I have this snippet of a code..
(r'^-?[0-9]+(.[0-9]+)?$', 'CD')
which is obviously a regular expression. But I can't interpret its meaning?...what is it referring to?
Please use a online regex tester like https://regex101.com/ there are also explanations for the different parts of the regex.
regex101.com is one site that explains regular expressions. You can run tests or provide examples to gain better understanding, too. Here's a link to your example: https://regex101.com/r/l53cFn/2