On 4/1/06, Benjamin D Adams <badams@xxxxxxxxxxxxxx> wrote: > I'm trying to check a string for ../ > <?php > if(preg_match("/..//i", $string)){ > echo "string has ../"; > } > ?> > > Can't get it to work can anyone help? Since / is your delimiter you need to escape it. Also '.' means anything so you need to escape that as well. if (preg_match('/\.\.\//', $string)) ... What are you trying to achieve? There may be a better way than using a regular expression. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php