Hi Jochem, JM> <accent voice="pirate"> JM> you be needing an ungreedy modifier on yer regex. JM> </accent> JM> see here: JM> http://php.net/manual/en/reference.pcre.pattern.modifiers.php RL Thanks very much. That solved my problem and I my now getting exactly what I RL want. I had seen the reference to greedy and ungreedy but had not understood the RL concept. RL Regards RL Richard -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php