JavaSc...:RegExp(3pm)
π JavaScript::QuickJS::RegExp β the manual page, but make it make sense π
okay bestie, so you know how Perl and JavaScript are like, two completely different friend groups that somehow share a cafeteria table? this is that. this lil doc is part of the User Contributed Perl Documentation situation, and it's all about bringing JavaScript's RegExp energy straight into your Perl era. no cap. π¦
β¨ NAME β¨
JavaScript::QuickJS::RegExp β it's a JavaScript RegExp, but in Perl. literally that. periodt.
πΈ SYNOPSIS πΈ
my $regexp = JavaScript::QuickJS->new()->eval("/foo/");
if ($regexp->test('fo')) {
# This wonβt run because test() will return falsy.
}
look at that. clean. gorgeous. and yes, the comment is telling the truth β test('fo') comes back falsy so that if block is giving empty-party energy, it is NOT running. don't be fooled by how cute it looks. π
π DESCRIPTION π
okay so this class is basically a whole JavaScript RegExp instance β like, the actual MDN-documented one (<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp>) β living its best life inside Perl. it's a translation, a glow-up, a whole vibe.
bestie listen. you do not instantiate this class directly. it's not that kind of class. this one gets handed to you, you don't go grabbing for it. hands off, respectfully. π
π METHODS π
okay this next part is simple, so stay with me. these methods are basically carbon copies of their JS equivalents β same name, same job, same energy:
exec()β does the JSexec()thingtest()β does the JStest()thing
and then we have the property girlies. these ones don't "do" anything, they just hand you back the corresponding JS property:
flags()dotAll()global()hasIndices()ignoreCase()multiline()source()sticky()unicode()lastIndex()
that's the whole list. no hidden extras, no secret bonus method tucked at the bottom. what you see is what you get, and what you get is iconic. β
and that's the page!! π«Ά this was perl v5.42.3, dated 2026-08-19, brought to you by User Contributed Perl Documentation β mwah, kissing the docs, going to bed. πβ¨
π¦ where this page comes from
- ubuntu stonking: libjavascript-quickjs-perl 0.21-3build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms