<<< Date Index >>>     <<< Thread Index >>>

Re: Length of regex/pattern for "color"



On Wed, Oct 22, 2003 at 04:29:13PM -0400, parv wrote:
>   "~s 
> '(archivers/p5-Archive-Tar|archivers/p5-Compress-Zlib|devel/p5-AppConfig|devel/p5-Class-Factory-Util|devel/p5-Class-Singleton|devel/p5-Config-General|devel/p5-Config-Ini|devel/p5-Date-Calc|devel/p5-Date-ICal|devel/p5-Date-ISO|devel/p5-Date-Leapyear|devel/p5-Date-Manip|devel/p5-Date-Pcalc|devel/p5-DateConvert|devel/p5-DateTime|devel/p5-DateTime-Locale|devel/p5-DateTime-TimeZone|devel/p5-ExtUtils-ParseXS|devel/p5-File-Temp|devel/p5-Inline|devel/p5-Inline-CPP|devel/p5-Locale-Maketext|devel/p5-Memoize|devel/p5-Module-Build|devel/p5-Params-Validate|devel/p5-Parse-RecDescent|devel/p5-Storable|devel/p5-Test-Harness|devel/p5-Test-Inline|devel/p5-Test-Simple|devel/p5-Tie-IxHash|devel/p5-Time-HiRes|devel/p5-Time-Local|devel/p5-Time-modules|devel/p5-TimeDate|dns/p5-Net-DNS|mail/p5-Mail-SpamAssassin|mail/p5-Mail-Tools|math/p5-Bit-Vector|misc/p5-I18N-LangTags|net/p5-URI|security/p5-Digest-HMAC|security/p5-Digest-MD5|security/p5-Digest-Nilsimsa|security/p5-Digest-SHA1|textproc/p5-FreeBSD-Ports|textproc/p5-Text-Balanced|textproc/p5-Text-Template|textproc/p5-YAML|www/p5-CGI-Application|www/p5-CGI-Kwiki|www/p5-CGI-modules|www/p5-CGI-Session|www/p5-CGI.pm|www/p5-HTML-Parser|www/p5-HTML-Tagset|www/p5-HTML-Template|www/p5-HTML-Tree|www/p5-libwww|www/p5-Template-Toolkit|x11-toolkits/p5-Tk|x11/p5-X11-Protocol)'"

I think maybe you could shorten the regex somewhat..
Perhaps  "~s 
'(archivers/p5-(Archive-Tar|Compress-Zlib)|devel/p5-(AppConfig|Class-(Factory-Util|Singleton)|Config-(General|Ini)))|...'"
If I can hack together a script to automate such a reduction quickly,
I will post it later.

Aloha,
 Allister

-- 
Allister MacLeod <amacleod@xxxxxxxx>
 Elen síla lúmenn'omentielvo.