packages/embed-plugin-utilities/src/insert.js
function isMatchPresent(regex, text, test = false) {
  return test ? regex.test(text) : text.match(regex)
}
function isMatchPresent(regex, text, test = false) {
  return test ? regex.test(text) : text.match(regex)
}
function isMatchPresent ( regex , text , test = false ) { return test ? regex . test ( text ) : text . match ( regex ) }
Returns the matched regex data or whether the text has any matching string
@param regex Regex of the matching pattern
@param text String which has to be searched
@param test Return boolean or matching array
@returns {*} Boolean|Array
Returns the matched regex data or whether the text has any matching string