code: function isMatchPresent(regex, text, test = false) {
    return test ? regex.test(text) : text.match(regex)
  }
docs: 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