than the combo char(13)char(10) combo. Your lines are
probably ending on \r\n, so when you just match on
only $ with "(?m)$", you get a match, but if you put
anything in front and try to match "(?m)\t$", you
won't get a match because there's an intervening \r
between the \t and $
--- Pascal Peters <[EMAIL PROTECTED]> 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]
