Watch out with newline characters. If it is coming from windows, there
will also be return characters. I usually do a REReplace of "\r\n" by
chr(10) first. If you work in multiline mode, it will work correctly.
Multiline mode is not necessary in your first regexp.

-----Original Message-----
From: Dick Applebaum [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 02:54
To: CF-Talk
Subject: Re: string parsing

I fiddled with this for a while -- you should be able to do it with a
single regexp.

The problem is complicated because of newline characters (2 after each
element) and one after the name MATTHEW .

So, rather than beat it to death I came up with the code below:

HTH

Dick

  <cfset source =

  '=============STAMP: 2004/06/23 14:54:45 MATTHEW
  I just called and Confirmed Jane Smiling with Teresa on the 4th.

  =============STAMP: 2004/06/22 15:33:37 MATTHEW
  Teresa had already filled the need that Denise just called in.

  =============STAMP: 2004/06/22 15:09:47 MATTHEW
  Denise Hooper called in an ICU need for tonight.
'
/>

<cfset sourceList = ReReplace(source, "(?m)\n\n", "|", "all") />
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to