[Pdx-pm] regex regex

Ben Prew ben.prew at gmail.com
Thu Jan 27 22:58:01 PST 2005

Yikes, if you can't vgrep the source, or don't know where the program
entry point is, I would just toss the file in your dev/test site to
see what it does.  Otherwise, write a test...


grep -ri '=[!~].*/.*/' *.pm 

while not perfect, will get you pretty close, and it eliminates things
like qw// and q// and qq// and others.

On Thu, 27 Jan 2005 10:08:15 -0800, Michael Rasmussen <mikeraz at patch.com> wrote:
> I have a number of scripts that filter directory contents checking for particular file names.
> Today I was asked "will a file named PDX200501270800KEYW.msg be processed by one of your scripts?"
> In reality the search is easy because I'll look for the program that handles the work for this particular business group.
> However, let's say I had to go through a large (i.e., bigger than I want to vgrep) number of
> source files. I'd want a program to look for regexes and then see if this filename would
> match.
> So I need a regex to find regexes.  Or do I?  Perhaps search for m|(/.*?/)| and then
> strip the /s and eval the remainder.
> Comments?
> --
>     Michael Rasmussen, Portland Oregon
>   Be appropriate && Follow your curiosity
>  http://meme.patch.com/memes/BicycleRiding
>    Get Fixed:  http://www.dampfixie.org
>   The fortune cookie says:
> Emerson's Law of Contrariness:
>         Our chief want in life is somebody who shall make us do what we
>         can.  Having found them, we shall then hate them for it.
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list

Ben Prew
ben.prew at gmail.com

More information about the Pdx-pm-list mailing list