OK, a regular expressions is doing my head in again, can anyone help? What I'm trying to do is, match and replace all new line characters with <br> that are not inside html such as tables or lists, e.g. in the following string I would not want to add a <br> while I'm inside the ordered list.
<cfset testString = " A test string with lots of line breaks <ol> <li>1</li> <li>2</li> <li>3</li> </ol> on several lines "> Sounds fairly simple? The \n bit for finding line breaks is at least ;D Craig Dudley Senior Developer Netstep Corporate Communications Ltd Direct Line: +44(0) 1422 319712 Phone: +44(0) 1422 200308 Fax: +44(0) 1422 200306 e-mail: [EMAIL PROTECTED] MS Messenger: [EMAIL PROTECTED] www: www.netstep.co.uk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189622 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54