From: Aryeh Gregor Date: Thu, 10 May 2007 01:07:10 +0000 (+0000) Subject: Make ugly regex slightly less ugly. You don't have to use / for the delimiter. X-Git-Tag: 1.31.0-rc.0~52985 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=a4172ecba8b564bb344791f88f38bc74591307d1;p=lhc%2Fweb%2Fwiklou.git Make ugly regex slightly less ugly. You don't have to use / for the delimiter. --- diff --git a/includes/Linker.php b/includes/Linker.php index 578cd09db8..f293a89ad0 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -842,7 +842,7 @@ class Linker { */ private function formatAutocomments( $comment, $title = NULL, $local = false ) { $match = array(); - while (preg_match('/(.*)\/\*\s*(.*?)\s*\*\/(.*)/', $comment,$match)) { + while (preg_match('!(.*)/\*\s*(.*?)\s*\*/(.*)!', $comment,$match)) { $pre=$match[1]; $auto=$match[2]; $post=$match[3];