[PHP] ereg

2003-09-12 Thread alexander sundli
I use this expression to remove oneline comments:
iereg_replace(//([^\n]*)\n,'',$code);

I need to make a check if this expression is inside a string. If it is, its
not a comment.

I think it has something to do with context..

Anyone who could help me?

thanx

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ereg_replace

2003-07-01 Thread alexander sundli
I'm trying to replace singel line comment with empty string.

tried ereg_replace(//.+\n,'',$string); but this replaces all text after
//.

anyone now what to do?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php