jamesp0tter
Programmer
i'm stuck...
imagine i have:
so, to get those lil letters, i use:
right ?
the thing is... $As will contain "aaaaadddd", $Bs will have "bbbdddd", $Cs "cccccccccdddd" and $Ds "dddd"... at least in my code..
do you see my problem ? why does \$4 appear everytime ?
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english
imagine i have:
Code:
$whtv_var = "[aaaaa] bbb (ccccccccc) - dddd";
so, to get those lil letters, i use:
Code:
$As = preg_replace("'\[(.*?)\] (.*?) \((.*?)\) - (.*?)'","\$1", $whtv_var);
$Bs = preg_replace("'\[(.*?)\] (.*?) \((.*?)\) - (.*?)'","\$2", $whtv_var);
$Cs = preg_replace("'\[(.*?)\] (.*?) \((.*?)\) - (.*?)'","\$3", $whtv_var);
$Ds = preg_replace("'\[(.*?)\] (.*?) \((.*?)\) - (.*?)'","\$4", $whtv_var);
right ?
the thing is... $As will contain "aaaaadddd", $Bs will have "bbbdddd", $Cs "cccccccccdddd" and $Ds "dddd"... at least in my code..
do you see my problem ? why does \$4 appear everytime ?
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english