Repository navigation
Release v4.183.0
Summary
A matches pattern now gives the same verdict on every host, every target framework, and in C# and JavaScript. Patterns are defined as a flagless JavaScript regular expression limited to forms that run in linear time. Screenplay checks them with its own matcher, without any timeout.
Changed
- A
matchespattern is now a flagless JavaScriptRegExprestricted to a portable linear dialect. Both compilers refuse lookarounds, backreferences,\b,\p{…}, .NET-only syntax (\A,\z, inline options, class subtraction) and patterns over the size budget with PLAY0699. The message names the construct and suggests an equivalent where one exists. Existing models that use one of these constructs no longer compile: rewrite the pattern as the message suggests, for example\A/\zas^/$or a length-only lookahead as a counted repeat. See Commands. (#800) matchesrules are evaluated by Screenplay's own linear-time matcher instead of .NET's regular expression engine. Verdicts no longer depend on how busy the host is, on the target framework or on runtime settings, and there is no timeout. (#800)- A few
matchesverdicts in the reference evaluator now agree with JavaScript where they used to differ:\sno longer matches Unicode spaces such as the no-break space U+00A0 (this also affects the built-inemailrule),.no longer matches\r, U+2028 or U+2029, and\wno longer matches U+0130. (#800) - Executable models saved by earlier versions still load when a pattern is outside the dialect. The evaluator reports such a rule as an unsupported validation, and generation checks report it as Unproven instead of timing out. (#800)
Fixed
- A
matchesrule no longer rejects a valid value, and a generation check no longer reports PLAY0689, because the host was too slow to finish matching within a second. (#800)