Question: I need help in this python program. please help!!! I have the regex for part one: (-?d+)s*/s*(d+) *([+*/-])s*(-?d+)s*/(d+) but now i need help in part

I need help in this python program. please help!!!

I have the regex for part one: (-?\d+)\s*\/\s*(\d+) *([+*\/-])\s*(-?\d+)\s*\/(\d+)

but now i need help in part 2.

I need help in this python program. please help!!! I have the

regex for part one: (-?\d+)\s*\/\s*(\d+) *([+*\/-])\s*(-?\d+)\s*\/(\d+) but now i need help in

Write a regular expression patt that can be used to extract (numerator,denominator,operator,numerator,denominator) from a string containing a fraction, an arithmetic operator, and a fraction. You may assume there is a space before and after the arithmetic operator and no spaces surrounding the character in a fraction. And all fractions will have a numerator and denominator. Example: >>s 23/45 14/9" >>>re.findal I (patt,s) >>S"-23/45 1419 >>>re.findal I (patt,s) In general, your code should handle any of the operators +, * and I. -, Note: the operator module for the two argument function equivalents of the arithmetic (and other) operators Write a regular expression patt that can be used to extract (numerator,denominator,operator,numerator,denominator) from a string containing a fraction, an arithmetic operator, and a fraction. You may assume there is a space before and after the arithmetic operator and no spaces surrounding the character in a fraction. And all fractions will have a numerator and denominator. Example: >>s 23/45 14/9" >>>re.findal I (patt,s) >>S"-23/45 1419 >>>re.findal I (patt,s) In general, your code should handle any of the operators +, * and I. -, Note: the operator module for the two argument function equivalents of the arithmetic (and other) operators

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!