Python Forum
i need a more complex regexp
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i need a more complex regexp
#4
If you could cut the expression on the character that is not valid in an arithmetic expression, you could parse the different pieces with the ast module, provided the arithmetic expressions follow python's syntax. Alternatively, you could replace the invalid character by an operator with low precedence such as 'or' and parse directly the whole expression with the ast module, provided that none of the arithmetic expressions uses the 'or' operator.
Reply


Messages In This Thread
i need a more complex regexp - by Skaperen - Oct-08-2019, 01:54 AM
RE: i need a more complex regexp - by Gribouillis - Oct-08-2019, 07:26 AM
RE: i need a more complex regexp - by Skaperen - Oct-08-2019, 10:09 PM
RE: i need a more complex regexp - by Gribouillis - Oct-09-2019, 05:58 AM
RE: i need a more complex regexp - by Skaperen - Oct-10-2019, 07:46 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020