[tpm] Regex question
Daniel Son
dsong at meta-for.org
Tue Nov 6 11:47:02 PST 2007
[...]
> DS> $x =~ s/^foo.*\n?//gm;
>
> DS> the last ? will ensure that the last line will be matched if there is no
> DS> new line
>
> that is what $ does already. $ matches a newline or the end of the
> string. and with /m it matches internal newlines.
>
The problem is that in /m mode it doesn't match the newline character
itself.
> uri
>
>
D
--
http://www.meta-for.org - Open Source software catalog
More information about the toronto-pm
mailing list