find

This tag uses a regex to find data in the input.

Created by: hackvertor
Installed 1 times

Category: String

Created on: Monday, October 7, 2024 at 9:39:33 PM

Updated on: Friday, December 20, 2024 at 8:08:05 PM

This is a built in tag
Tag arguments
[
   {
      "type": "string",
      "help": "This is the regular expression used",
      "defaultValue": "regexp"
   },
   {
      "type": "string",
      "help": "This is the regular expression flags",
      "defaultValue": "gim"
   }
]
Code
class find {
  encode(input, regex, flags) {
    return input.match(new RegExp(regex, flags));
  }
}