another regexp question
Posted: Fri May 21, 2004 11:19 am
I've played some with regular expressions and found out that this line works:
There must be an easier way, right?
Code: Select all
<?php
if (ereg("[h][t][t][p][:][/][/]", $page) || ereg("^[/]", $page) || ereg("[.][/]", $page) || ereg("[.][.][/]", $page)) echo "ERROR!";
?>