> Sun Dec 21 2003 Lachlan Andrew <[EMAIL PROTECTED]> > > * htsearch/htsearch.cc: > Improve handling of restrict/exclude URLs with spaces or encoded chars > > This fix was based on a poorly-conceived "fix" offered by Jean-Sebastien > Morisset on Nov. 17, so he could more easily deal with restrict > patterns involving file names with embedded spaces. I had replied to > his suggestion as follows...
<aside> Note that regcomp has some quirks... I had to deal with this recently Example: "\n" is NOT necessarily a 1 character string as interpreted by regcomp. Most implementations of regcomp MUST have ascii escape codes like "\n" be converted to 1 byte value BEFORE passing to regcomp. We don't see this in C & C++ if we have a hardcoded regex in our code... the compiler escapes the string. Same in PHP. If you are reading a string from a file or other method, then the string may not be properly escaped to it's 1 byte value.... so regex tries to match a 2-byte string. Note that "\w" which is a 'switch' to regcomp and not an ascii escape code is just fine. </aside> Neal Richter Knowledgebase Developer RightNow Technologies, Inc. Customer Service for Every Web Site Office: 406-522-1485 ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ ht://Dig Developer mailing list: [EMAIL PROTECTED] List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-dev
