If you really want to allow [ and ] in your tags as well, you can, I think, create some complex look-ahead regex that disallows for [img] to appear, by allowing for [ if it's not followed by i and allowing [i if it's not followed by m and allowing [im if it's not followed by g and so on: