Does Java do non-greedy matching? If so, you could try /<!--(.+?)--(.)/ and reject the match unless $2 is '>'. That might avoid the stack problem.
In reply to Re: Regex Problem - alternative searched
by BrowserUk
in thread Regex Problem - alternative searched
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |