OT: regex pattern problem

Rob Park rbpark at ualberta.ca
Thu Jan 8 01:03:03 UTC 2004


Craig Tinson wrote:
> I have to find all entries in a file which match the following:
> 
> (pg. 2)
> (pg. 210)
> (pg. 211)
> (pg. 309)
> (pg. 4000)
> 
> etc etc
> 
> what regex pattern would I use?

As Iain mentioned, it depends entirely on what program you're using, as 
they all interpret regex slightly differently.

That said, if it is in perl, I'd use this:

\(pg\. \d+\)





More information about the fedora-list mailing list