firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.21k stars 198 forks source link

"Is Null" does not appear to work #2129

Closed jimw54321 closed 10 months ago

jimw54321 commented 10 months ago

Bug Description

The "is null" functionality does not appear to work for "lazy" regex.

Reproduction steps

  1. Create a testcase
  2. Create a regex (a??)
  3. Choose "capture group one"
  4. Choose "is null"
  5. Create another testcase
  6. Create a regex a??
  7. Choose "fullmatch"
  8. Choose "is null"

Expected Outcome

Both testcases should pass.

Browser

Include browser name and version Google Chrome Version 115.0.5790.170

OS

Include OS name and version AlmaLinux release 9.2

firasdib commented 10 months ago

Thanks for the report, I've fixed the bug.

But thinking about it, can full match is null is equivalent to regex does not match, and the unit test will always fail if the unit test never matches anything (unless "does not match" is selected). Perhaps I should disable is null for full match?

Edit: Would seem my code was doing that before, but another bug came in the way. I'll adjust :)