JSFiddle - React, Tailwind, and code Playground

by tuga

JavaScript

var myString = "{html}here is html code{/html}{css}here is css code{/css}";
var myRegexp = /\}(\w.*?)\{\//g;
var match = myRegexp.exec(myString);
    console.log(match[1]);
    console.log(match[2]);