How do I detect the difference between a bad ereg pattern and no matches?

I've got a UI that allows the user to enter an ereg expression. Clearly, the user may enter an invalid expression (for example, the expression may not have matching [] brackets). ereg returns false if there are no matches or if an error occurred.

I need to distinguish between no matches and an error, so I can present a meaningful message to the user. Any suggestions on how to do this?

Thanks,

Jared

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

Reply via email to