Test, validate and match regular expressions
This PCRE regex matches a set of square brackets containing no spaces or nested brackets, along with any adjacent whitespace. It is designed for removing Wikipedia-style inline citations, such as [1] or [abc], from scraped text data. The global and multiline flags allow it to find and remove all occurrences throughout a multiline document while cleaning up the extra spacing left behind.