Hello, Could you please confirm that the following is correct for replacing a string of numbers: $old_string = "pub-([A-Za-z0-9]+)"; $new_string = ereg_replace("[A-Za-z0-9]+", "7185536717731935", $old_string); I think I've done something wrong. When I've resolved this how do I add it to an existing script. Do I use a Get results command, then apply it to the results? Thanks for your help. Luke
if you want to replace anything after "pub-" with "7185536717731935" why not just preg_replace("/pub\-.*$/", "7185536717731935", your_string_here)
Is preg_replace("/pub\-.*$/", "7185536717731935", your_string_here) all the code I need? your_string_here could be anything I define it as, like $replace ?