At 5:41 PM -0600 28/3/07, Norman Palardy wrote: >On Mar 28, 2007, at 5:25 PM, Dr Gerard Hammond wrote: > >> Hi, >> >> I have a long file full of INSERT, UPDATE and SELECT statements. >> Does anybody have a piece of RegEx code that'll split the lines >> reliably into individual SQL statements. >> RegEx and I don't normally get on. >> >> Files typically look like this. > >Do you need to maintain returns in the textual items you have in the >mail or are those long fields that have been wrapped by mail ?
Those CRs are real. > >If not I'd try to do this in 2 steps in BBEdit :) so far so good. That's where it is now ;-) >Remove all line endings >Then turn all ; into ; + an end of line But what happens to a field that might look like this UPDATE t1 set f2='(There is nothing like a dame); Nothing...' Column data in the SQL may have ); in there.... -- Cheers, Dr Gerard Hammond MacSOS Solutions http://www.macsos.com.au _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
