Hi Thomas,

Historians believe that on Fri, 19 Jan 2001 at 01:19:03 GMT +0800,
Thomas [TF] typed:

JA>> You've got the logic, but ^ anchors the search to the beginning of a
JA>> line.

TF> Why is this wrong? The string "X-Mailer" is at the beginning of the
TF> line, isn't it?

Well, the beginning of the line is before "X-Mailer", so when
searching for the beginning of the line, the anchor must come before
the string.  ie "^X-Mailer"

>From the help file [HF]:

HF> When PCRE_MULTILINE it is set, the "start of line" [...]
HF> constructs match immediately following [...] any newline in the
HF> subject string [...]

TF> Should be '*.' "Reapeat any character"

You're thinking too much the way humans think.  Think the way shampoo
manufacturers think, "Lather, Rinse, Repeat."

>From the help file [HF]

HF> A quantifier is a modifier for an atom. It can be used to specify
HF> that a particular atom must appear at least once, as in b+.

HF> Quantifier  Matches         Example    Matches       Doesn't Match
HF>    *        Zero or more    ab*c       ac, abc       abb
HF>             instances of
HF>             the atom
                
Notice the example

TF> %SETPATTREGEXP="(?m-s)X-Mailer\:\s?(^*.)"%REGEXPMATCH="%HEADERS"

TF> Return:

TF>  *** Error: nothing to repeat ***

Yup, you used the wrong syntax.  I don't want to give away the answer,
especially since you asked me to avoid doing so.

TF> I then took out the '^' but got the same result. :-(

You're on the right track.  Hopefully this will give you some ideas.

-- 
Thanks for writing,
 Januk Aggarwal

 Using The Bat! 1.49c under Windows 98 4.10 Build 2222  A

 Ok, who is General Relativity, and what did he do with Sir Newton?

-- 
______________________________________________________
Archives   : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

Reply via email to