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

Re: dist-git help wanted: write me a regex!



Once upon a time, Jesse Keating <jkeating redhat com> said:
> $logmsg =~ s|/((Mon|Tues?|Wed|Thu(rs?)?|Fri|Sat|Sun)\s+(Jan|Feb|Mar|Apr|
> May|June?|July?|Aug|Sep|Oct|Nov|Dec)\s+[0-3]?[0-9]\s+(19|20)[0-9][0-9]\s
> +[^<]+<[^\s ]+@[^\s@>]+>\s+2.[4-6].[0-9.-]+\s*)/|mg

The first character after the "=~ s" is the delimiter, so you are saying
search for "/((Mon" and replace it with "Tues?" and then "Wed..." are
arguments.  The regexp as sent (delimited with "/") was just a match,
not a search/replace.

I don't know the code; what exactly are you trying to do here?  Strip
out date/email lines?

-- 
Chris Adams <cmadams hiwaay net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.


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