buggrep - Bugs: bug #30455, \s now matches whitespace

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #30455: \s now matches whitespace

Submitted by:  None
Submitted on:  Thu 15 Jul 2010 08:34:59 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 16 Jul 2010 08:41:40 PM UTC, comment #1:

The escapes were already handled this way by the backtracking matcher. So the behavior was inconsistent depending on whether grep used the DFA matcher or the backtracking matcher.

I committed a documentation patch to document \s and \S.

Thank you for the bug report. This bug has been fixed in the
development sources, which can be downloaded using git from
git://git.sv.gnu.org/grep.git

Paolo Bonzini <bonzini>
Thu 15 Jul 2010 08:34:59 PM UTC, original submission:

$ echo " " | grep -c '^\s'
1
$ echo s | grep -c '^\s'
0

According to the documentation, the results ~should~ be:

$ echo " " | grep -c '^\s'
0
$ echo s | grep -c '^\s'
1

If this is a desired feature (and I for one think it is very
undesirable to change the way grep works) it should be at least
documented.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 16 Jul 2010 08:41:40 PM UTCbonziniStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Summary\\s now matches whitespace=>\s now matches whitespace

    Back to the top


    Powered by Savane 3.1-cleanup1