in reply to Re^2: Can't quite get this regex working
in thread Can't quite get this regex working

Careful, when the delimiters are doubled, the file format might allow a single ] or [ on the inside, in which case the negated char class doesn't work.

In that case you can use

(?s:(?!\]\]).)*

Replies are listed 'Best First'.
Re^4: Can't quite get this regex working
by JavaFan (Canon) on Apr 08, 2011 at 11:50 UTC
    I much prefer:
    /[^]]*(?:][^]]+)*/
    which doesn't require any lookahead, backtracking or modifiers.