On 12/18/06 at 3:41 PM, [EMAIL PROTECTED] (Theo Van Dinter) wrote:

> On Mon, Dec 18, 2006 at 02:39:13PM -0500, Andrew Brosnan wrote:
> > In perl you can use $&, parens $1, $2, etc. to capture the text 
> > that matched a regex; but how do you do it in sa?
> 
> It depends what you're trying to do.  If you want to do matching 
> between different rules, you can't do it, short of writing a plugin 
> to do what you want.  If you want to match within the same regex, 
> it's like any other regex:
> 
> /([a-z]+) foo bar \1/
> 
> generally speaking, capturing increases resource usage, so don't do 
> it unless necessary (hence the large amount of (?:...) instead of 
> (...) in the rules).


Thanks Theo,

I'd like the rule to catch when the first name in from: is also the
subject:.

I was going to capture the name in from: and compare it to subject:.

I'll have to give some thought to how I can do that without capturing
text. :-)

Regards,
Andrew

Reply via email to