On 20:53 10 Jan 2002, Anh Lai <[EMAIL PROTECTED]> wrote: | > * Anh Lai <[EMAIL PROTECTED]> [2002-01-10 20:21]: | > > How do I make mutt color lines starting with % as a quote just like > | > > apparently David only uses this, and i would like to learn how to add % | > > as a quote indicator. | > | > http://mutt.org/doc/manual/manual-6.html#quote_regexp | > | > from my muttrc file: | > set quote_regexp="^([ \t]*([>|:}#%]|[A-Z]{2,3}>))+" | > | great, thanks. I dont know enough about regular expressions to even | figure that out with the manual.
Ok: the outer (.....)+ is two things: a grouping "()" and "one or more" (the "+"); BTW this is unneeded guys since this is purely for recognising quoted lines, not matching the entire quoted marker the stuff inside the outer () is: [ \t]* zero or more "*" spaces-or-tabs "[ \t]" then ([>|:}#%]|[A-Z]{2,3}>) which is an alternation "(...|...|...)" meaning match one of the "..." parts, containing two alternatives: [>|:}#%] one of the characters > | : } # % or [A-Z]{2,3}> exactly 2 or 3 "{2,3}" of the characters in the range A-Z, immediately followed by the character > So in short it's looking for some leading whitespace and then either a single quote marker ( "> | : } # %" ) or an attribution marker like "CS>" for lines from "Cameron Simpson". The outer "(...)+" is superfluous in my opinion. -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Lister: `Mr Arnold' isn't even his name. His name's `Rimmer'; or `Smeghead'; or `Dinosaur breath'; or `Molecule Mind'. And if you want to be really mega-polite to him, Kryten -- we're talking mega-mega-polite -- on those rare and exceptional circumstances, you can call him `Arsehole'. - Red Dwarf, _Kryten_