This will only work on MX. The thing that is going wrong is that CF is
including Line feed in . (most regexp engines aren't). You are better
off treating the string as a list with chr(10) & chr(13) as the
delimiters. This will also work in older versions of CF.

> -----Original Message-----
> From: Nathan Strutz [mailto:[EMAIL PROTECTED]
> Sent: maandag 22 maart 2004 20:16
> To: CF-Talk
> Subject: Re: Regex help
>
> this one should work:
>
> "(?m)^.*$"
>
>
>
> from the cfdocs:
> ====================
> (?m)
>
>
> If at the beginning of a regular _expression_, it specifies the
> multiline mode for the special characters ^ and $.
>
> When used with ^, the matched string can be at the start of
> the of entire search string or at the start of new lines,
> denoted by a linefeed character or chr(10), within the search
> string. For $, the matched string can be at the end the
> search string or at the end of new lines.
>
> Multiline mode does not recognize a carriage return, or
> chr(13), as a new line character.
>
> The following example searches for the string "two" across
> multiple lines:
>
> #reFind("(?m)^two", "one#chr(10)#two")#
>
> This example returns 4 to indicate that it matched "two" after the
> chr(10) linefeed. Without (?m), the regular _expression_ would
> not match anything, because ^ only matches the start of the string.
>
> The character (?m) does not affect \A or \Z, which always
> match the start or end of the string, respectively. For
> information on \A and \Z, see Using escape sequences.
> ====================
>
> -nathan strutz
>
>
>
> Ray Bujarski wrote:
>
> > I am parsing a document that is a simple unix text
> document.  I want
> > to grab one line at a time so I use refind("^.*$", text, 1, true).  
> > However this doesn't grab a single line at a time, it grabs
> the entire
> > blob of text?!  Am I doing something wrong?
> >
> > Thanks,
> >
> > Ray
> >
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to