|
From: | Mel Hatzis |
Subject: | Re: 4.0 beta - question on parsing of subject line in PR header |
Date: | Wed, 15 May 2002 16:19:11 -0700 |
User-agent: | Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.8) Gecko/20020206 |
Mel Hatzis wrote:
Milan Zamazal wrote:"MH" == Mel Hatzis <address@hidden> writes:MH> After understanding this a little more, we determined that there MH> was definitely a bug here. The regular expression used is MH> incorrect ...for one, it requires a '\<' as the start of the MH> subject line in order to match. It is also missing an escape MH> character before the '|' and is incorrectly anchored to the MH> beginning of the subject line. MH> I have attached a patch. Thank you, Mel, for the patch. Before I apply it, I'd like to clarify one little thing: Do you know why `\\<' didn't work? It should mean "beginning of a word", should it be notated in a different way (other than the one you've used)?Milan, I was incorrect regarding the use of '\\<'...it does work. You can change the pattern match to the following: "(.*[^\\<])?\\<((PR[ \t/])\\|([-a-z0-9_+.]+/))([0-9]+)" I tested this and it works. I guess this is what was originally intended.
Thinking about this some more, it would be *really* useful to allow this regular expression to be overriden in the dbconfig file. Allowing user's to define their own would provide them the flexibility to get as fancy as they want with some of the corner cases where the default regex behaviour is not desirable...such as "Re: PR 50 (was PR 33)" which matches PR 33. Thoughts? -- Mel Hatzis Juniper Networks, Inc.
[Prev in Thread] | Current Thread | [Next in Thread] |