Options for Bun Regular Expressions


OptionDescriptionBackend valuePortable value
dGenerate indices for substring matches. (hasIndices)d(not portable)
gGlobal search. (global)g(not portable)
iCase-insensitive search. (ignoreCase)iignorecase
mAllows ^ and $ to match next to newline characters. (multiline)mmultiline
sAllows . to match newline characters. (dotAll)sdotall
u"Unicode"; treat a pattern as a sequence of Unicode code points. (unicode)u(not portable)
vAn upgrade to the u mode with more Unicode features. (unicodeSets)v(not portable)
yPerform a "sticky" search that matches starting at the current position in the target string. (sticky)y(not portable)