Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RegExp Is Capturing

A function that tells you whether a RegExp contains capturing groups or not.

All features up to ES2025 are supported.

Install

npm install regexp-is-capturing

Usage

import isCapturing from 'regexp-is-capturing';

// Let's check if some regexes contain capturing groups or not

isCapturing ( /foo/ ); // => false
isCapturing ( /(foo)/ ); // => true
isCapturing ( /(?<foo>bar)/ ); // => true
isCapturing ( /(?:foo)/ ); // => false

License

MIT © Fabio Spampinato

About

A function that tells you whether a RegExp contains capturing groups or not.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages