Imported to Memo Field - Delete CRLF's before text?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm doing a very large import of data that was mined from Word documents.
For some of the fields imported there are unfortunately a number of carriage
returns before the field text starts.
ie.
--------------------
Field Name:


data
data
data
 
Thank you John for the reply. I've tried the function you've described in an
update query. I'm getting an error message (see below).

Undefined function 'rgxExtract' in expression.

I'm using the function:

rgxExtract([ArchitecturalContext],"^\s*(.*)$",0,False,False,True)

Any ideas?

Thanks again!
Matt

John Nurick said:
Hi Matt,

There's no built-in "super-Trim()". You could write a custom VBA
function and call it from a query, or grab the rgxExtract() function
from http://www.j.nurick.dial.pipex.com/Code/vbRegex/rgxExtract.htm.
Calling this in an update query should do the job:

=rgxExtract([MyField], "^\s*(.*)$", 0, False, False, True)

On Tue, 17 Jan 2006 12:16:03 -0800, "Matt Schillerberg" <Matt
I'm doing a very large import of data that was mined from Word documents.
For some of the fields imported there are unfortunately a number of carriage
returns before the field text starts.
ie.
--------------------
Field Name:


data
data
data

---------------------

I'd like to be able to delete the carriage returns that precede the actual
text. Is there a way a function similar to TRIM that will will remove all
spaces and CRLFs that precede the text?
 
Did you copy the VBA code for the function into a module in your
database? If not, you need to: follow the instructions on the web page.


Thank you John for the reply. I've tried the function you've described in an
update query. I'm getting an error message (see below).

Undefined function 'rgxExtract' in expression.

I'm using the function:

rgxExtract([ArchitecturalContext],"^\s*(.*)$",0,False,False,True)

Any ideas?

Thanks again!
Matt

John Nurick said:
Hi Matt,

There's no built-in "super-Trim()". You could write a custom VBA
function and call it from a query, or grab the rgxExtract() function
from http://www.j.nurick.dial.pipex.com/Code/vbRegex/rgxExtract.htm.
Calling this in an update query should do the job:

=rgxExtract([MyField], "^\s*(.*)$", 0, False, False, True)

On Tue, 17 Jan 2006 12:16:03 -0800, "Matt Schillerberg" <Matt
I'm doing a very large import of data that was mined from Word documents.
For some of the fields imported there are unfortunately a number of carriage
returns before the field text starts.
ie.
--------------------
Field Name:


data
data
data

---------------------

I'd like to be able to delete the carriage returns that precede the actual
text. Is there a way a function similar to TRIM that will will remove all
spaces and CRLFs that precede the text?
 
Back
Top