Regular expression (WAS: an effective script for grabbing and putting images from or to a website)
- From: Jürgen Exner <jurgenex@xxxxxxxxxxx>
- Date: Sun, 17 Jun 2012 21:35:51 -0700
Cal Dershowitz <cal@xxxxxxxxxxxxxxx> wrote:
... but I still don't understand why deleted material is not also
returned in this idiom:
my ($ext) = $name =~ /([^.]*)$/;
But there is no "deleted material" to begin with.
A regular expression matches text. What text does this one match? From
the end of the string forward anything that is not a dot. And that match
is captured by the paranthesis and thus copied to $ext.
There is nothing deleted at all. Just print $name and you will notice
that it didn't change one bit.
jue
.
- Follow-Ups:
- References:
- an effective script for grabbing and putting images from or to a website
- From: Cal Dershowitz
- Re: an effective script for grabbing and putting images from or to a website
- From: Rainer Weikusat
- Re: an effective script for grabbing and putting images from or to a website
- From: Ben Morrow
- Re: an effective script for grabbing and putting images from or to a website
- From: Rainer Weikusat
- Re: an effective script for grabbing and putting images from or to a website
- From: Ben Morrow
- Re: an effective script for grabbing and putting images from or to a website
- From: Rainer Weikusat
- Re: an effective script for grabbing and putting images from or to a website
- From: Cal Dershowitz
- an effective script for grabbing and putting images from or to a website
- Prev by Date: Re: an effective script for grabbing and putting images from or to a website
- Next by Date: Re: Regular Expression
- Previous by thread: Re: an effective script for grabbing and putting images from or to a website
- Next by thread: Re: Regular expression (WAS: an effective script for grabbing and putting images from or to a website)
- Index(es):