Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1247528

Bug#1106335: grep: non-sensical matches - "over-matching"

From Sunny73Cr <Sunny73Cr@protonmail.com>
Newsgroups linux.debian.bugs.dist
Subject Bug#1106335: grep: non-sensical matches - "over-matching"
Date 2025-05-23 04:00 +0200
Message-ID <KPpRv-53ad-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Package: grep
Version: 3.8-5

PATH_TEST="../../dir/dir/dir/dir/@#$%^&*()-_=+\\|;:'\",<.>/?/";
echo "$PATH_TEST" | grep "^\.\?\.\?\([a-zA-Z0-9@#$%^&*()-_=+\|;:'",<>/?]\+\)\+/\?$";

. is not within the character set portion of the match specification provided to grep.
../../ is matched; I expect it to match only '../', therefore no match for the line.
. is also matched in the ,<.> portion toward the end of the path.

SOURCE="[[]]";
echo "$SOURCE" | grep "[[]]\+"

The very first [ is not matched in this string.
grep "[\[\]]\+" does not match it either.

Regards,
sunny

Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Bug#1106335: grep: non-sensical matches - "over-matching" Sunny73Cr <Sunny73Cr@protonmail.com> - 2025-05-23 04:00 +0200
  Bug#1106335:  Sunny73Cr <Sunny73Cr@protonmail.com> - 2025-05-23 04:20 +0200

csiph-web