I got this code from another tool, and i want to allow the character / because it would be part of the instalation tool that I'm developing. How can I allow the character / ? Code: # If strange characters in $install_path, then error if(!preg_match("/^[a-zA-Z0-9\-\.]{0,255}$/",$install_path)) $go_api->errorMessage($go_api->lng("The instalation path contains invalid characters.")); thank you.
you can try this (untested!): Code: # If strange characters in $install_path, then error if(!preg_match("/^[a-zA-Z0-9\-\.\/]{0,255}$/",$install_path)) $go_api->errorMessage($go_api->lng("The instalation path contains invalid characters.")); or this: Code: # If strange characters in $install_path, then error if(!preg_match("°^[a-zA-Z0-9\-\./]{0,255}$°",$install_path)) $go_api->errorMessage($go_api->lng("The instalation path contains invalid characters."));