I've written this regex for a PHP regex function:
\[\[.*?\]\]
This matches words or phrases between double square brackets. What I'm trying to find now is a regexp that match two or more consecutive (identical or not) matches. I've tried with
(\[\[.*?\]\]){2,}
and with this workaround: Regular Expression For Consecutive Duplicate Words. However, none of them worked. Does anyone has a better idea?
What I'm trying to match is, for example, [one][two][three]
. The first part of the regexp will match [one]
and I'm trying to get the entire phrase [one][two][three]
.
Thanks!