9.1 How do I make sure that my post has the right topic?
Description: How do I make sure that my post has the right topic?
Keywords: mailman-member

##
9.1 How do I make sure that my post has the right topic?

When a list administrator defines a topic, he or she sets three things:

- a topic name
- a regular expression (regexp.)
- a description

You can view this information by logging in to your member options page. (See Section 3.1 for more details on how to do this.) and clicking on the ``details'' link for any topic that interests you.

To post on a given topic, you need to make sure that the Keywords: or Subject: headers in a message match the regular expression for that topic. A regular expression is a pattern which may match more than one thing. Regular expressions can actually be fairly complex, so you may want to just ask the list administrator if you don't know how to make heads or tails of the expression given.

If you really want to know more about regular expressions, read on, but for the most part, your list administrator should include in the topic description what you need to add to your Keywords or Subject line to match the topic pattern.

Most Mailman topic expressions will be fairly simple regular expressions, so in this document we will simply give you some common examples. Regular expressions are a bit too complex to teach in a few lines here, so if you really want to understand how the regular expressions work, you should find a tutorial or reference elsewhere. (For example, DevShed has a decent tutorial at http://www.devshed.com/Server_Side/Administration/RegExp/)

Here are some examples of possible regular expressions and matching lines:

Regular expression | Matching lines
--- | ---
zuff | Keywords: zuff
zuff | Keywords: ZUFF
zuff | Keywords: Zuff
zuff | Keywords: amaryllis, zuff, applesauce
zuff | Subject: [zuff] Do you have the right stuff for zuff?
zuff | Subject: Do you have the right stuff for zuff?
zuff | Subject: What is zuff?
\[zuff\] | Keywords: [zuff]
\[zuff\] | Subject: [zuff] Do you have the right stuff?
\[zuff\] | Subject: Online zuff tutorials (was Re: [zuff] What is zuff?)

A few notes:

- The matching is case-insensitive, so if zuff matches, so will ZUFF, zuFF, and any other variations in capitalization.
- Some characters have special meaning in a regular expression, so to match those characters specifically, they must be ``escaped'' with a backslash (\). As you can see in the above example, [ and ] are such characters. (Others include ``.'', ``?'', and ``*''). The backslash is also used for other things (I wasn't kidding about regular expressions being complex: consult other documentation for details about other uses of the backslash character), but this is the most likely use in a topic expression.