We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c92447 commit 2d2e422Copy full SHA for 2d2e422
1 file changed
src/ugrep.cpp
@@ -8435,18 +8435,18 @@ void ugrep()
8435
}
8436
8437
8438
- // patterns .*, . and .+ are easy special cases to optimize for search
+ // patterns .* and .+ are common easy special cases to optimize for search
8439
if (!flag_fixed_strings && !flag_dotall && Static::bcnf.singleton_or_undefined())
8440
{
8441
if (regex == ".*")
8442
8443
flag_match = true;
8444
+ flag_empty = true;
8445
regex.clear();
8446
- else if (regex == "." || regex == ".+")
8447
+ else if (regex == ".+")
8448
8449
- flag_empty = false;
8450
8451
8452
0 commit comments