I have a text with variables like [abcderere].
In order to detect those variables i decided to create the following regex :
(\[.+?\])
It does work with string like [azerty][qwerty] but I want my regex to also detect String like [[azerty] because it matches the pattern but it doesn’t work
Perhaps this will help:
Given a string such as
[[azerty], it will skip the first square bracket and match[azerty]. For the string[[azerty][foobar]]it will match[azerty]and[foobar]. Demo here.