O.P. RE: Problem with RegExp + Replace
thanks Shondoit - works a bit better
now i need to refine the regexp to capture mathpieces better - currently smileys are also captured because of ')'
so im thinking that a math piece is constructed by:
- a number of brackets '()' zero or more
- at least 2 numbers
- at least one operator '/*-+^'
a math rule is that 2(5+4) == 2*(5+4) so this one needs to be captured aswell
a better choice then looking for mathpieces is to let the user mark a piece himself... with corner brackets '[]' which is many times simpler
Next - how do i EVAL the piece ?? earlier in the thread, a function was written - this is a bit unhandy - and i recall that the function would only process one math piece ?
|