Restores non-capturing groups removed in #381 to fix issues where the anchors will only apply to the immediate value they are next to rather than the sequence of values in an OR match. The tests on the previous PR passed since the examples do not contain any leading or trailing text. Thanks to @dmoinescu-r7 for drawing attention to the issue.
Example
The current regex ^NETIASPOT Management Console|Konsola zarzdzania NETIASPOT$" matches the following strings:
NETIASPOT Management Console
NETIASPOT Management Consoletest
NETIASPOT Management Console test
Konsola zarzdzania NETIASPOT
testKonsola zarzdzania NETIASPOT
test Konsola zarzdzania NETIASPOT
The corrected regex ^(?:NETIASPOT Management Console|Konsola zarzdzania NETIASPOT)$ only matches the following strings:
Description
Restores non-capturing groups removed in #381 to fix issues where the anchors will only apply to the immediate value they are next to rather than the sequence of values in an OR match. The tests on the previous PR passed since the examples do not contain any leading or trailing text. Thanks to @dmoinescu-r7 for drawing attention to the issue.
Example
^NETIASPOT Management Console|Konsola zarzdzania NETIASPOT$"
matches the following strings:^(?:NETIASPOT Management Console|Konsola zarzdzania NETIASPOT)$
only matches the following strings:Motivation and Context
Fix regex issue.
How Has This Been Tested?
bundle exec ./bin/recog_verify FILENAME
rake tests
Types of changes
Checklist: