JSFiddle - React, Tailwind, and code Playground

by Jake

HTML

dfdf

JavaScript

var att = 'ttl';
var regex = `/ ${att}=/"([^"])"/`;

var str = `[btn ttl="Blah Blah Blah, baby doo" color="green"]

<em><strong>It worked</strong></em>?? This is the inner content.

[/btn]`;

c

console.log( regex.match(str) )
/*
Exception: SyntaxError: return not in function
@Scratchpad/2:19
*/