end-of-string. For some reason, I think that there's a way to change
that, but I can't remember what it is. In any case, you could always
replace $ with something like [#chr(10)##chr(13)#]{1,2} which is less
convenient, but would generally work.
--Ben
Pascal Peters wrote:
> Am I missing something or is multi-line regexp in CFMX broken? I was
> trying to replace something in a file. If the end of a line is a caret
> followed by spaces or tabs, I needed to replace it with "^N/A". I came
> up with the solution:
>
> newtext = REReplace(text,"\^[ \t]*(?=([\r\n]|$))","^N/A","all");
>
> Theoretically the following should also work:
>
> newtext = REReplace(text,"(?m)\^[ \t]*$","^N/A","all");
>
> The problem is it doesn't. It only replaces the actual ending of the
> string, not the ending of lines. Am I missing something here?
> If I do
>
> newtext = REReplace(text,"(?m)$","=","all");
>
> it adds a = at the line of every line though.
>
>
> Pascal Peters
> Certified ColdFusion MX Advanced Developer
> Macromedia Certified Instructor
> LR Technologies
> Av. E. De Mot, 19
> 1000 BRUSSELS, BELGIUM
> Tel: +32 2 639 68 70
> Fax: +32 2 639 68 99
> Email: [EMAIL PROTECTED]
> Web: www.lrt.be
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
