gpmax bond wrote:
Please help by pointing me what's wrong with Reg Exp I am using.
You need to make the "*" following the )) possessive otherwise you have the potential for massive backtracking.
Making this possessive will solve the stack overflow problem but I don't know if the regex will then perform as desired; you must
test that.
You also seem to have a number of redundant non-capturing groups. I think you can reduced the regex to