or do this:
$string="rou0123.hils.ch_8.txt";
$stringArray=explode(".",$string);
$stringA=$StringArray[0];
$stringB=$StringArray[2];
echo $stringA."\n";
echo $stringB."\n";
try this. explode puts each section of the string (with the "." being the delimiter) into an array .
to put everything back together, use:
implode(".",$stringArray);
or
join(".",$stringArray);
-j