Hi, I have a 100's of strings like e.g: 6-11-08 no pastoral care, no social work, I need to try general office on Ext 55905, Called through, NA at11.38 - call back. 6-11-08 called through at 14.53…. NA so sent samples C/o GO Mgr. TO DO 7-11-08 DONE 22.12.08, called through for the mgr of general office, turns out GO mgr is the hospital mgr. called and no answer at 11.46 so left msg to call me back. 14.1.09, got email from switch, so sent her an email. DONE Email bounced back, call on frid Code (markup): What i want to do is use a function to find any reference to a date e.g. 0-00-00 or 00-00-00 or 00.00.00 etc and if found then add a line break. At the moment this is just one big block of text so is difficult to read. How would i go about doing this? Thanks in advance. Adam
Hi, You can try something like this: $s='6-11-08 no pastoral care, no social work, I need to try general office on Ext 55905, Called through, NA at11.38 - call back. 6-11-08 called through at 14.53…. NA so sent samples C/o GO Mgr. TO DO 7-11-08 DONE 22.12.08, called through for the mgr of general office, turns out GO mgr is the hospital mgr. called and no answer at 11.46 so left msg to call me back. 14.1.09, got email from switch, so sent her an email. DONE Email bounced back, call on frid'; echo preg_replace("#(\d{1,2}[\-\.]\d{1,2}[\-\.]\d{2})#m","$1<br />",$s); PHP: Regards