Lucas_Werkmeister_WMDE added a comment. |
safe-regex mainly works by measuring the star height of the regex, and disabling nesting is a crude way to limit the star height to 1, so that we don’t need to parse the regex. (a*b*[ac]*$ has multiple stars, but its star height is still one.)
That said, a slightly modified version of your regex (a*a*b$) does cause long query runtimes when tested against a long string of as in WDQS. But I can’t reproduce that behavior locally with Java String.matches() nor with PHP preg_match(), so I’m not sure if that’s a problem related to the regex engine or some BlazeGraph weirdness.
TASK DETAIL
EMAIL PREFERENCES
To: Lucas_Werkmeister_WMDE
Cc: Halfak, Anomie, Smalyshev, tstarling, daniel, GWicke, Joe, Lucas_Werkmeister_WMDE, Krinkle, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, merbst, LawExplorer, Agabi10, SBisson, Wikidata-bugs, aude, jayvdb, fbstj, santhosh, Jdforrester-WMF, Mbch331, Rxy, Jay8g, Ltrlg, bd808, Legoktm
Cc: Halfak, Anomie, Smalyshev, tstarling, daniel, GWicke, Joe, Lucas_Werkmeister_WMDE, Krinkle, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, merbst, LawExplorer, Agabi10, SBisson, Wikidata-bugs, aude, jayvdb, fbstj, santhosh, Jdforrester-WMF, Mbch331, Rxy, Jay8g, Ltrlg, bd808, Legoktm
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs