in reply to Parsing using Regex and Lookahead
Instead you can use this regex: ^\[ [^\]]* \]
Which always matches an opening bracket, other characters and then the closing bracket, so in the example above it will never match more than the [a]
(whitespaces added for clarity, you need the /x modifier if you want to keep them).
|
|---|