Bug in BRRE? Can't find simple phone number match. #1

Open
opened 2015-05-30 00:54:09 +00:00 by shawnhalf · 1 comment
shawnhalf commented 2015-05-30 00:54:09 +00:00 (Migrated from github.com)

I think I found a very big and obvious bug in your BRRE
Regex engine. I have attached a very small Delphi 7 project to
demonstrate it for you. Oops, looks like zip attachments are not allowed,
please download it here:

http://www.optimaloption.net/testregex.rar

When trying to capture very simple 10 digit phone numbers of this format
xxx-xxx-xxxx using this simple regex:

\d\d\d[-]\d\d\d[-]\d\d\d\d

...BRRE will not find the valid match from this data:

9245-817-2286

... the valid match should be 245-817-2286, no? I tried several online
regex testers and they all found the match fine.

However, if I change the first digit '9' in the test data to a letter,
like so:

x245-817-2286

... then BRRE will find the match 245-817-2286. Very strange. Can you
help please?

Thank You!
Shawn

I think I found a very big and obvious bug in your BRRE Regex engine. I have attached a very small Delphi 7 project to demonstrate it for you. Oops, looks like zip attachments are not allowed, please download it here: http://www.optimaloption.net/testregex.rar When trying to capture very simple 10 digit phone numbers of this format xxx-xxx-xxxx using this simple regex: \d\d\d[-]\d\d\d[-]\d\d\d\d ...BRRE will _not_ find the valid match from this data: 9245-817-2286 ... the valid match should be 245-817-2286, no? I tried several online regex testers and they all found the match fine. However, if I change the first digit '9' in the test data to a letter, like so: x245-817-2286 ... then BRRE _will_ find the match 245-817-2286. Very strange. Can you help please? Thank You! Shawn
shawnhalf commented 2015-06-29 20:38:38 +00:00 (Migrated from github.com)

Update to that download link:

http://www.getdemocode.com/testregex.rar

Update to that download link: http://www.getdemocode.com/testregex.rar
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BeRo1985/brre#1
No description provided.