1

The two following regular expression objects that match a decimal number are functionally equal:

a = re.compile(r"""\d +  # the integral part
                   \.    # the decimal point
                   \d *  # some fractional digits""", re.X)
b = re.compile(r"\d+\.\d*")

How can I compare them by their functionality?
In this case a == b should be True.

pushkin
  • 9,575
  • 15
  • 51
  • 95
Chertkov Pavel
  • 33
  • 2
  • 11

0 Answers0