JSFiddle - React, Tailwind, and code Playground
by konglie
JavaScript
//http://stackoverflow.com/questions/7183711/what-regex-will-match-from-a-specified-trigger-until-a-space
var REGEX = /.*(\[[a-z]+:[a-z]+)\s.*/;
var str = "This is a [place:car a great place to go!";
var matchedStr = str.match(REGEX);
var result = matchedStr[1];
alert(result)