in reply to (Regex Madness) And you thought whitespace was easy.

"\n\n\n" eq reverse "\n\n\n", so I don't see how reversing helps here. Could you explain more?

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: (Regex Madness) And you thought whitespace was easy.
by japhy (Canon) on Aug 16, 2001 at 01:56 UTC
    If I don't reverse the string, then "\n\n\n" gets turned into " \n\n". If I reverse the string, do the change, and reverse it again, I get "\n\n " instead.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;