FAQ
I don't know much about regular expressions, is this the proper format /^Medical -/g I want any email with "Medical -" to be filter into a topic.

Search Discussions

  • Mark Sapiro at May 21, 2006 at 3:23 pm

    Jason [WeatherServer] wrote:
    I don't know much about regular expressions, is this the proper format /^Medical -/g I want any email with "Medical -" to be filter into a topic.

    If you want to match any Subject: or Keywords: that *begins with*
    "Medical -", you want

    ^Medical -

    (note this also matches "medical -", as Topic matches ignore case)

    See <http://docs.python.org/lib/re-syntax.html> and the HowTo
    referenced therein.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan
  • Jesse Keating at May 22, 2006 at 6:49 pm

    On Sun, 2006-05-21 at 08:23 -0700, Mark Sapiro wrote:
    ^Medical -

    (note this also matches "medical -", as Topic matches ignore case)
    I also discovered (and solved my own problem) that spaces have to be
    escaped in the regex field.

    To match 'Fedora Core 5' I had to use 'Fedora\ Core\ 5' in the regex
    box.

    --
    Jesse Keating
    Release Engineer: Fedora
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: not available
    Type: application/pgp-signature
    Size: 189 bytes
    Desc: This is a digitally signed message part
    Url : http://mail.python.org/pipermail/mailman-users/attachments/20060522/7c479da6/attachment.pgp
  • Mark Sapiro at May 23, 2006 at 12:04 am

    Jesse Keating wrote:
    On Sun, 2006-05-21 at 08:23 -0700, Mark Sapiro wrote:
    ^Medical -

    (note this also matches "medical -", as Topic matches ignore case)
    I also discovered (and solved my own problem) that spaces have to be
    escaped in the regex field.

    To match 'Fedora Core 5' I had to use 'Fedora\ Core\ 5' in the regex
    box.

    Yes. My bad.

    I forgot about the fact that the regexps in Topic expressions are
    compiled in VERBOSE mode (see
    <http://www.amk.ca/python/howto/regex/regex.html#SECTION000450000000000000000>)
    as well as IGNORECASE.

    --
    Mark Sapiro <msapiro at value.net> The highway is for gamblers,
    San Francisco Bay Area, California better use your sense - B. Dylan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedMay 21, '06 at 4:37a
activeMay 23, '06 at 12:04a
posts4
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase