We're updating the issue view to help you get more done. 

The class BESRegex is utilized in a way that is incompatible with the underlying implementation. FIX

Description

The class BESRegex::match() method has an non-intuitive behavior that has made it get used in ways that I think have serious unintended consequences.

BESRegex::match() returns the number of characters that match, -1 if there's no match.

And that is a problem because in practice (and I looked at) the code that utilizes this method looks like this:

1 2 3 if(regex.match(...)){ // stuff todo if it matches }

And that is really bad because when nothing matches the -1 returned evaluates as true.

This ticket is to fix the behavior of the method, and review every point of use to make sure things work as expected.

Environment

None

Status

Assignee

Sam Lloyd

Reporter

Nathan Potter

Labels

Fix versions

Story Points

1

Epic Link

Priority

Highest