Well Ive gotten (.*)
and ([a-z]*[0-9]*_*-*) to work thus far as the first group. I would like to avoid option 1, and option 2 doesn't seem right.... Gerard Samuel wrote: > Im expecting a string like foo.png. > Im trying to replace 'foo' with another value that I have. > Im trying this -> > $file = preg_replace('/([a-z][0-9]-_*)(.[a-z]{3,4})/i', $new_file . > "$2", $_FILES['upload']['name']); > > The second regex group works ok, its the first one I cannot figure out. > It is supposed to contain alpha numeric characters and '_' and '-'. > Thanks for any input. > -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php