dist-git help wanted: write me a regex!
Chris Adams
cmadams at hiwaay.net
Mon Dec 21 18:36:04 UTC 2009
Once upon a time, Jesse Keating <jkeating at 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 at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
More information about the devel
mailing list