JSFiddle - React, Tailwind, and code Playground by seong gyun jeon October 13, 2012 JavaScript var regExp1 = /(t\w*s)\s(t\w*e)/; alert('tims the'.replace(regExp1, '$2, $1'));