.
D 2003-10-29T16:15:26
J assignee nobody
J closedate 2003-10-29T09:15:26
J closer dkf
J icomment Logged\sIn:\sYES\s\nuser_id=79902\n\nFleshing\sout\swith\san\sexample:\n\n\s\sset\sRE\s{the.*complex.*regexp}\n\s\s#\sMatch\sonce\sagainst\sthe\sempty\sstring;\sthis\sforces\scompilation\n\s\sregexp\s$RE\s{}\n\s\s#\sNow\suse\s$RE\sinstead\sof\sthe\sliteral\sand\syou'll\suse\sthe\n\s\s#\spre-compiled\sRE.\n\nIn\sfact,\sthere's\sa\sfew\sother\splaces\swhich\sdo\scaching\sas\nwell.\sBut\sIMHO\sthe\sbiggest\sadvantage\sof\sthe\sabove\stechnique\nis\sthat\syou\scan\salso\sgive\slogical\snames\sto\syour\sRE\s(e.g.\n$LinkTagMatcher\sinstead\s{<a[^>]*?HREF="([^"]+)"})\sand\sthis\nis\sa\sbig\swin\sin\smaintenance\sand\scode-simplicity\sterms.\n
J login dkf
J mimetype text/plain
J resolution Invalid
J status Closed
J username dkf
K 832230ffffffffffffffffffffffffffffffffff
U dkf
Z fbee2d25ac16e46b901f70b3d15a6041