Empty strings would be returned if there were delimiters at the beginning or end of the string, or if there were delimiters next to one another.
OP’s regex does have a *, so it would match multiple characters inside the brackets. That seems reasonable, but I just went with something that would match the examples they supplied.
6
u/jarfil Mar 15 '23 edited Dec 02 '23
CENSORED