I have this:
Code: Select all
$a="<curbase>";
$b = regexreplace($a, "(.+)\_(.*)", "$1"),,1;
echo $b;but it returns apple_pear_banana and I can't figure out how to use the non-greedy ? to make it stop at the first underscore instead of the last. Cheers.
XYplorer Beta Club