why does this regex not work ??
| From: | geoka | Date: | Sun, 23 Jul 2000 15:12:55 +0000 |
| Subject: | why does this regex not work ?? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-1251@lists.php.net to get a copy of this message | ||
hi, please have a look at this:
ereg("/\*.*?\*/",$text)
for dedecting c-style comments.
/* blabla */
/ slash
\* escaped
.* repeat any character
? ungreedy
\* escaped
/ slash
i think i need an ungreedy ? cause somthing like
this
/* 111 */ $i++; /* 222*/
would be recognized only as one comand cause the
end of the line matches the expression, too.
so, whats wrong
Warning: REG_BADRPT: in ./scr_host.php on line 3
yours,
geoka