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

 
 

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

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

Submitter:  Jari Aalto <jaalto>
Submitted:  Sat 08 May 2010 12:42:03 PM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by jaalto (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.9