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

Re: OT: regex pattern problem



Incoming from Craig Tinson:
> guys.. regex patterns are a *complete* mystery so am hoping someone can
> help with one..
> 
> I have to find all entries in a file which match the following:
> 
> (pg. 2)

Which tool?  I believe perl's would be:

  /\(pg\. [0-9]*\)/

or:

  /\(pg\. \d+\)/


Shell would be:

  \(pg\. [0-9]*\)


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)               http://www.spots.ab.ca/~keeling 
- -



Reply to: