You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Flash accepts regexp with named groups and these can be accessed as either indexed elements or properties on the returned object. Flash uses the ?P<name> syntax for defining named groups but this does not work with ruffle and it fails to handle these kind of regular expressions resulting in exec() returning null.
Expected behavior
when named groups are pressent Flash returns result/object while Ruffle returns null.
var namedGroup =/my(?P<groupName>Str)$/m;var namedExec = namedGroup.exec("myStr");trace("index:"+namedExec[1]);// Flash results in "index:Str" // Ruffle : Error #1009: Cannot access a property or method of a null object reference.trace("named:"+namedExec.groupName);//Flash results in "named:Str"// Ruffle Error #1009: Cannot access a property or method of a null object reference.
Affected platform
Desktop app
Operating system
Windows 10
Browser
No response
Additional information
using the named group syntax that the library that ruffle expects (?<name>) do result in named group for the internal structure but it looks like ruffle dont propagate these to the object that is returned so even if the syntax mismatch was to be resolved ruffle still would not allow you to access the named groups by name.
var namedGroup =/my(?<groupName>Str)$/m;var namedExec = namedGroup.exec("myStr");trace("index:"+namedExec[1]);// the group got a matchtrace("named:"+namedExec.groupName);// however the named property does not exists and returns undefined"
The text was updated successfully, but these errors were encountered:
While we currently rely on regress for this, the possibility of switching to the regex crate instead came up on Discord, so this might be relevant in that case: rust-lang/regex#956
@torokati44 Although regex supports this particular syntax for named capture groups, regress supports backreferences, a far more consequential feature, which regex intentionally does not support.
Describe the bug
Flash accepts regexp with named groups and these can be accessed as either indexed elements or properties on the returned object. Flash uses the
?P<name>
syntax for defining named groups but this does not work with ruffle and it fails to handle these kind of regular expressions resulting inexec()
returning null.Expected behavior
when named groups are pressent Flash returns result/object while Ruffle returns null.
Affected platform
Desktop app
Operating system
Windows 10
Browser
No response
Additional information
using the named group syntax that the library that ruffle expects (
?<name>
) do result in named group for the internal structure but it looks like ruffle dont propagate these to the object that is returned so even if the syntax mismatch was to be resolved ruffle still would not allow you to access the named groups by name.The text was updated successfully, but these errors were encountered: