Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regular Expression Search and parse?

 We all know what "grep" does, but does anyone know of a utility that 
uses parameterized regular expressions as a search mechanism and outputs 
only the parameters that were found? Sort of like the regex function call. 

So, if I have file with a lot of lines that look like this: 

Title: The Long and Winding Road [ISBN:123456] 
Descr: A boring book about boring roads 
Author: A dull cab driver 

I could execute: 

myregex "Title:*\[ISBN:$1\]" file.txt 

and get an output of all the ISBN numbers 

This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

Discuss mailing list 
[hidden email]

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /