JSFiddle - React, Tailwind, and code Playground

by Jerry

JavaScript

var str = "![][][]";
var res = str.match(/!\[(.*?)*\]/);
alert("Whole match: " + res[0] + "\nCaptured group: " + res[1]);