It is better to comply the same mechanism as in standard PHP to use REG_EXTENDED in regcomp(). The following patch should be applied.
--- amule-cvs.orig/src/webserver/src/php_core_lib.cpp 2007-12-08 02:04:25.000000000 +0800
+++ amule-cvs/src/webserver/src/php_core_lib.cpp 2008-01-03 11:10:29.660948088 +0800
@@ -1475,7 +1475,7 @@
}
regex_t preg;
char error_buff[256];
- int reg_result = regcomp(&preg, pattern->str_val, 0);
+ int reg_result = regcomp(&preg, pattern->str_val, REG_EXTENDED);
if ( reg_result ) {
regerror(reg_result, &preg, error_buff, sizeof(error_buff));
php_report_error(PHP_ERROR, "Failed in regcomp: %s", error_buff);