Subj : PCRE in Synchronet? To : Angus Mcleod From : Digital Man Date : Fri Dec 17 2004 02:10 pm Re: PCRE in Synchronet? By: Angus Mcleod to Digital Man on Fri Dec 17 2004 07:35 am > Quick question: Can SBBS do Perl-compatible Regular Expressions? Not currently. > I know that (for instance) ./text/name.can uses it's own type of pattern > specifiers. Yet JS uses a Perl-type syntax for RE's in the match() > function. I'm just curious to know if it would be possible to use > Perl RE syntax from within the C code itself or if that's limited to JS > only. I don't see a function in the SpiderMonkey API to handle regexp's natively. It does contain private functions to handle regexp's (see include/mozilla/js/ jsregexp.h), but it's very JS-centric (deals with JS contexts and strings and such). > I'm thinking in particular of the "Twit filter" stuff. It's great, but > pretty rudimentary. I'd have a go at making some small improvements, but > RE's would really help. The twitlist.cfg supports the same pattern matching specifiers as the .can files. If you don't find these specifiers sufficient, you could always enhance str_util.c:findstr(). For full PCRE support, a 3rd party cross-platform RE library would need to be utilized or figure out someway to use the spidermonkey RE code (assuming you don't want to create one from scratch). digital man Snapple "Real Fact" #10: Mosquitos are attracted to people who just ate bananas. .