buggrep - Bugs: bug #29827, 2.6.3 FEATURE REQUEST: Extend...

 
 

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

bug #29827: 2.6.3 FEATURE REQUEST: Extend --only-matching to accept submatch

Submitted by:  Jari Aalto <jaalto>
Submitted on:  Sat 08 May 2010 12:42:03 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun 09 May 2010 02:00:09 PM UTC, comment #1:

For backwards compatibility the optional argument could only be added to the long option; with that caveat I like this change.

Paolo Bonzini <bonzini>
Sat 08 May 2010 12:42:03 PM UTC, original submission:

Manual page reads:

-o, --only-matching
Print only the matched (non-empty) parts of a matching line,
with each such part on a separate output line.

FEATURE REQUEST

Extend the option to accept additional numeric argument to control the submatch returned. (By default 0). This woudl make it possible to run:

echo "Program version 1.12" | grep -E -o 1 "Program.*([0-9.]+)"

Jari Aalto <jaalto>

 

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)
  • -unavailable- added by jaalto (Submitted the item)
  •  

    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):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup