Regex Parse
Parse a regex into it's individual parts.
Install
npm install regex-parse
Usage
const regexParse = ; ;//=> { main: "a", options: "g" } regexParse//=> /a/g
API
regexParse(regex)
regex
Type: RegExp | string
The regex to parse.
regexParser.from(options)
options
Type: object
main
Type: string
The first part of the regex.
options
Type: string
The second part of the regex.