This is my string:
[TEST1 lorem ipsum123][TEST2 lorem ipsum123][TEST3 lorem ipsum123]Test4
I would like to match [TEST1 lorem ipsum123]
. From TEST1 until ] it can be anything.
This is what I have tried
TEST1.+\]
But it will match the string until the last ]
character. How can I let it match until the first character instead?