According to Jessica Biola:
> Can anyone tell me which regular expression options
> are made available through ht://dig? I'm wondering
> which repetition operators are available, and what
> syntax they're available in.
>
> [0-9a-z]?
> [^\?]*
> [abcdefg]+
> [12345]{1,4}
There are actually two parts to that question, I think, which should be
addresses separately. First, I should clarify what parts of ht://Dig use
regular expressions, and what the syntax conventions are for these various
parts. Secondly, I'll address the actual regular expression syntax.
In 3.1.6, regular expressions are only used by the url_rewrite_rules and
search_rewrite_rules attributes. The first string in each pair of strings
in the attribute setting is a regular expression. The only special syntax
that's needed is to double up any backslashes you need in the expression,
because the normal attribute string parsing, which handles variable and
file expansion (${attr} and `...`) swallows single backslashes. In 3.2
betas, several other attibutes like exclude_urls and limit_urls_to can
allow some of the strings in their lists to be regular expressions,
provided the whole string is in brackets (i.e. [regular-expression]).
Again for these, backslashes must be doubled up.
As for the actual regular expression syntax, it may be that this depends
on your system. ht://Dig will use the C library's regex code if it can,
otherwise it falls back on the bundled code, which I think is taken from
glibc 2.1. They're parsed by regcomp() using the REG_EXTENDED option,
so see "man regcomp" for details. Most likely it will be POSIX Extended
Regular Expression syntax, but I don't have a reference for that at hand
right now.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html