function index_text [message #13487] |
Tue, 14 October 2003 14:06 |
ngockhoi
Messages: 15 Registered: July 2003 Location: Paris
Karma: 0
|
Junior Member |
|
|
I must have the warning
Delimiter must not be alphanumeric or backslash
this is not a bug, but supposed to be a feature of php i think.
the delimiters
into the regexp. eg. "^$" becomes "/^$/"
function index_text($subj, $body, $msg_id)
....
$cs = array('/\W/', '/!\s+!/');
$cd = array(' ', ' ');
reverse_fmt($subj);
$subj = trim(preg_replace($cs, $cd, strip_tags(strtolower($subj))));
reverse_fmt($body);
$body = trim(preg_replace($cs, $cd, strip_tags(strtolower($body))));
Best regards,
|
|
|
Re: function index_text [message #13490 is a reply to message #13487] |
Tue, 14 October 2003 14:19 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You are wrong, ! is a valid delimiter, there is no reason to add the extra //. The warning you are seeing is likely the result of your custom replacments.
FUDforum Core Developer
|
|
|
|
Re: function index_text [message #13493 is a reply to message #13491] |
Tue, 14 October 2003 14:46 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Yup, in that case you are correct, the fix is already in the CVS.
FUDforum Core Developer
|
|
|