Equivalent to repeat.bind(null, '\\d')
and('a', 'b', 'c') // -> 'abc'
capture('\\d+?') // -> (\\d+?)
or you can name your capture group with capture(pattern, name)
capture('\\d+?', 'number') // -> (?<number>\\d+?)
extra('.', matchers.LAZY) // -> '.+?'
extra('.', false) // -> '.+'
Similar to a capture(...), but won't keep the capture within the parentheses
group('.|\\s') // -> (?:.|\\s)
or('a', 'b', 'c') // -> 'a|b|c'
Equal to RegExp()
constructor
```js repeat('\d') // -> \d repeat('\d', 8) // -> \d{8} repeat('\d', 1, 3) // -> \d{1,3} repeat('\d', 1, Infinity) // -> \d{1,}
whole('sentence to match') // -> ^sentence to match$
wildcard('.') // -> '.*'
wildcard('.', true) // -> '.*?'
Creates a negative or positive look-ahead
look.ahead.positive('Y') === look.ahead('Y') // -> '(?=y)'
look.ahead.negative('Y') // -> '(?!y)'
look.behind.positive('Y') === look.behind('Y') // -> '(?<=y)'
look.behind.negative('Y') // -> '(?<!y)'
Matches opposite of matchers
regex(matchers.not.ALPHA) // -> '[^A-z]'
Generated using TypeDoc
Equivalent to
repeat.bind(null, '[A-z]')