Which PATTERN captures only the first bracketed value?
'[a][b]'.match(PATTERN)[1] === 'a'
/\[(.*?)\]//\[(.*)\]//\[(.+)\]//\[(.)*\]/
The lazy
Play Regex ▸
.*? stops at the first ]; the greedy forms run on to the last one.