You might want to be careful when using perl type regexp in PHP. Not all system admins install the PCRE by default, and I remember that some servers running PHP3 do NOT allow PCRE. (ie CI Host did not when I was with them last year).
Without PCRE though, you cannot do non-greedy matches cuz the regexp in PHP do not have that type of functionality.