Wednesday, 21 August 2013

splitting strings with operator relative to paranthesis

splitting strings with operator relative to paranthesis

I want the following strings to be splitted by the (relative to the pairs
of paranthesis) outest operator (in this case: '+'):
1: "((20 + 20) + a)"
2: "(20 + ((20 + 20) + 20))
The results should be like this:
1: "((20 + 20) " and " a)"
2: "(20 " and " ((20 + 20) + 20))"
Thanks for your help! :)

No comments:

Post a Comment