From: Chris Marusich <cmmarusich@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: ding@lists.math.uh.edu
Subject: Re: nnimap-split-fancy: regexp ".*" matches less than expected
Date: Sat, 07 Apr 2018 10:03:41 -0700 [thread overview]
Message-ID: <873707hrte.fsf@gmail.com> (raw)
In-Reply-To: <87h8on9ydh.fsf@linux-m68k.org> (Andreas Schwab's message of "Sat, 07 Apr 2018 11:09:14 +0200")
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Apr 06 2018, Chris Marusich <cmmarusich@gmail.com> wrote:
>
>> This is the same as before, but I've replaced "gnucash-user" with ".*".
>> I expected the same result as before, but Gnus surprised me. Instead,
>> gnus-summary-respool-query says:
>>
>> This message would go to list.user
>>
>> and gnus-summary-respool-trace says:
>>
>> ("cc" "\\(.*\\)@gnucash.org" "list.\\1")
>> "list.\\1"
>>
>> In this case, why does the ".*" match "user" instead of "gnucash-user"?
>
> I think that happens because the actual regexp used for searching is
> "\\(\\(FIELD\\):.*\\)\\<\\(VALUE\\)\\>", note the embedded ".*".
That would explain it. Thank you!
It would be nice if the Gnus manual described in a little more detail
how the regexp defined in the "fancy" split method will be used.
Without knowledge that a ".*" was put in front of my regexp, the results
I was seeing made no sense. I would submit a patch for the manual
myself, but I'm still just a Gnus beginner, so I can't (yet!) speak with
much authority on the subject.
By the way, where is this regexp defined in the Gnus source? I ran "M-x
rgrep" with the following regexp in the Emacs 25.3 source but found no
results:
"\\\\\\\\(\\\\\\\\(.+?\\\\\\\\):\\.\\*\\\\\\\\)\\\\\\\\<\\\\\\\\(.+?\\\\\\\\)\\\\\\\\>"
"M-x regexp-builder" tells me that this regexp should match the regexp
string you mentioned above. If you know of a better way for me to find
it in the source, I'd love to know!
Again, thank you for the help.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-04-07 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-07 6:08 Chris Marusich
2018-04-07 9:09 ` Andreas Schwab
2018-04-07 17:03 ` Chris Marusich [this message]
2018-04-07 18:31 ` Andreas Schwab
2018-04-08 18:55 ` Chris Marusich
2018-04-08 19:49 ` Andreas Schwab
2018-04-10 0:14 ` Dan Christensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873707hrte.fsf@gmail.com \
--to=cmmarusich@gmail.com \
--cc=ding@lists.math.uh.edu \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).