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).

-- 
Randomly Selected Tagline:
The main problem I have with cats is, they're not dogs.
                -- Kevin Cowherd

Attachment: pgpW1e5quqsek.pgp
Description: PGP signature

Reply via email to