Hi...
I need somewone pretty good dealing with RegEx.
I need to buid a RegEx expression to validate math operators that arent within parenthesis.
By math operator I mean +,-,* and /
Sample matches:
2+3 >Matches 1 (easy)
2+(2-3) >Matches 1
(#RentCP*2)/4 >Matches 1 (the / operator)
(#A/2)+#B*(A-2) >Matches 2 (the + and * operators)
(2*(A+2))/3 >Matches 1 (the / operator)
-(B+4)*3 >Matches 2 (the - and * operators)
Sample non matches:
(2+3)
(2*(A+2))
As you may already fugured out, this is to work with math expressions.
If somewone wants to put his RegEx skills on this itll be geatlly appretiated...
Thank you very much.
Alex
I need somewone pretty good dealing with RegEx.
I need to buid a RegEx expression to validate math operators that arent within parenthesis.
By math operator I mean +,-,* and /
Sample matches:
2+3 >Matches 1 (easy)
2+(2-3) >Matches 1
(#RentCP*2)/4 >Matches 1 (the / operator)
(#A/2)+#B*(A-2) >Matches 2 (the + and * operators)
(2*(A+2))/3 >Matches 1 (the / operator)
-(B+4)*3 >Matches 2 (the - and * operators)
Sample non matches:
(2+3)
(2*(A+2))
As you may already fugured out, this is to work with math expressions.
If somewone wants to put his RegEx skills on this itll be geatlly appretiated...
Thank you very much.
Alex
