JavaScript::QuickJS::RegExp
my $regexp = JavaScript::QuickJS->new()->eval("/foo/"); if ($regexp->test('fo')) { # This won’t run because test() will return falsy. }
This class represents a JavaScript RegExp instance in Perl.
This class is not instantiated directly.
The following methods correspond to their JS equivalents:
exec()
test()
In addition, the following methods return their corresponding JS property:
flags()
dotAll()
global()
hasIndices()
ignoreCase()
multiline()
source()
sticky()
unicode()
lastIndex()
To install JavaScript::QuickJS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JavaScript::QuickJS
CPAN shell
perl -MCPAN -e shell install JavaScript::QuickJS
For more information on module installation, please visit the detailed CPAN module installation guide.