Im trying to move around parts of a string a get rid of some of it too. Below is an example...
$str = "a b c d e f g VALUES(h i j k l m n) Bound Values: o|p|q|r|s|t|u|";
What i need to do is move the o|p|q|r|s|t|u| into the parenthsis after "VALUES" and then erase the stuff after it. I know how to erase the stuff (substr = "") but im having trouble moving the pattern. Is there a way i can assign a whole pattern's results to a variable?
ex: $str = "fjdsfds(fdjfksdjflds)fjdsklfjds";
$t = m/(*)/; ???? #basically get everything in between the parenthesis???
$str = "a b c d e f g VALUES(h i j k l m n) Bound Values: o|p|q|r|s|t|u|";
What i need to do is move the o|p|q|r|s|t|u| into the parenthsis after "VALUES" and then erase the stuff after it. I know how to erase the stuff (substr = "") but im having trouble moving the pattern. Is there a way i can assign a whole pattern's results to a variable?
ex: $str = "fjdsfds(fdjfksdjflds)fjdsklfjds";
$t = m/(*)/; ???? #basically get everything in between the parenthesis???