I am trying to write a regular expression that will look in a string and determine which parts of the string are equations. For example:
Hello this is 2+3 an equation and 1-2+1-3 is one too as well as (1+2-4) but I'm afraid ( 1 / 2 *(1+2)) is an equation too.
This would return 2+3 1-2+1-3 (1+2-4) and ( 1 / 2 *(1+2)).
Numbers may or may not have spaces between them. The symbols are + - * /. Also mind the parentheses. Any ideas? Most of my attempts have failed up to now.
Thank you very much.
Deleted by ee_ai_construct, 500 points refunded. - 11/15/2004 4:30:25 PM PST