JSFiddle - React, Tailwind, and code Playground

by gcjnst

JavaScript

var x = 'abcdef';
var r = 'dde';
var y = x.search(new RegExp(r));
alert(y);