> "You" == <[EMAIL PROTECTED]> writes:
You> I don't understand the regex s#.*/##s
You> (given as part of the solution to problems 2 and 3)
You> more specifically, I don't know what the last 's' does
You> to the regex.
As others have said, the trailing "s" allows newline to be matched:
oth
>From perldoc perlre:
s Treat string as single line. That is, change "." to
match any character whatsoever, even a newline, which
normally it would not match.
>>> <[EMAIL PROTECTED]> 06/19/01 01:40pm >>>
I don't understand the regex s#.*/##s
(given as part of the
Hi,
s/#.*/##
The above is used either to indicate a substitution of a string. The "s"
indicates substitute. The rule is, that whatever you specifiy after the "s",
is the regex that you are looking for (this in the above case "#.*"). This
is then separated by a "/". Anything after is the replace
On Tue, 19 Jun 2001 [EMAIL PROTECTED] wrote:
> I don't understand the regex s#.*/##s
>
> (given as part of the solution to problems 2 and 3)
>
> more specifically, I don't know what the last 's' does
> to the regex.
It lets . match a newline (\n). It also will make the match ignore $*
-- which
I don't understand the regex s#.*/##s
(given as part of the solution to problems 2 and 3)
more specifically, I don't know what the last 's' does
to the regex.
__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.