the way Michael says, by default -- very unlike Perl.
But, if you set the (?m) switch, it works like Perl.
Here's some code:
<cfset source="
12/23/03 some test
01/12/04 some other text
04/15/04 bad day
"/>
<cfset output1 = reReplace(source, "^.{9}", "<br>", "all")/>
<cfset output2 = reReplace(source, "(?m)^.{9}", "<br>", "all")/>
<cfoutput>
<br><b>Source</b><br>
#source#
<br><br><b>Output1</b><br>
#output1#
<br><br><b>Output2</b><br>
#output2#
</cfoutput>
Here's the browser output:
<br><b>Source</b><br>
12/23/03 some test
01/12/04 some other text
04/15/04 bad day
<br><br><b>Output1</b><br>
<br> some test
01/12/04 some other text
04/15/04 bad day
<br><br><b>Output2</b><br>
<br> some test
<br>some other text
<br>bad day
So that is the way CFMX works ^ means either beginning of text or
beginning of line depending on the (?m) switch.
I don't know if Studio supportd this dual option.
Dick
On Apr 16, 2004, at 12:55 PM, Michael Dinowitz wrote:
> Well, it's either that the word 'line' is referring to a chunk of text
> that is
> expected to be only 1 line long or the core posix library used in CF
> Studio, CF5
> (and all earlier versions) and probably even in Homesite+ is not a
> 'standard'
> library.
>
> > This from the 6th paragraph below:
> >
> >���`^'��(match�
> > ing��the��null��string��at��the beginning of a line), `$'
> > (matching the null string at the end of a��line)
> >
> > So is this a bug in Studio?
> >
> > his from the 6th paragraph below:
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

