in reply to Regular Expression help, MS Access Pipe delimited export gone bad

If you are dealing with a very small data file, or this is just a one-shot program than you can skip the rest of this post with my apologies.

I stress again that you should really focus on correcting the problem from the source and then generating an usable export file. Important issues still hold true:

Here is MS Access VB code that will allow you to create a global function that can be called anywhere from within your application and strip the hard returns. It is certainly not optimized, but I'm at work and had to do a quick and dirty. Just be sure that you make a copy of your Access database to work/export from. Create a MS Access VB module:
Option Compare Database Option Explicit Public Function Strip_crlf(mStr) Dim mNewStr As String mNewStr = mStr While (InStr(mNewStr, Chr(13))) Mid(mNewStr, InStr(mNewStr, Chr(13)), 1) = " " Wend While (InStr(mNewStr, Chr(10))) Mid(mNewStr, InStr(mNewStr, Chr(10)), 1) = " " Wend Strip_crlf = mNewStr End Function
Once you create this module you can use the function to either write a sub that will process all text fields in the database, more simply create a Update Query that does the module call:  Strip_crlf([fieldname]) for each "Update to:" text field. Then export the table as you originally wanted it.

HTH,

--Jim