Re: regexp
From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 01/30/04
- Next message: Paul Lalli: "Re: Perl, DBI, localhost problem"
- Previous message: Dan Wilga: "Re: Spam Filter Pattern Matching"
- Next in thread: David K. Wall: "Re: regexp"
- Maybe reply: David K. Wall: "Re: regexp"
- Maybe reply: David K. Wall: "Re: regexp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 17:28:14 +0100
Jayme Assuncao Casimiro wrote:
> I have used:
> ($title) = $_ =~ m{<a.*?>(.*?)</a>};
> ($price) = $_ =~ m{.*Our Price:\s(\$?[\d\,.]+)};
> ($descount) = $_ =~ m{.*You Save:.*?[\d\,.]+.*?([\d\,.]+)};
>
> But I would like to use only one regexp.
So, what stops you?
($title, $price, $discount) = m{...};
------------------------------------^^^
(to be filles with the regex)
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
- Next message: Paul Lalli: "Re: Perl, DBI, localhost problem"
- Previous message: Dan Wilga: "Re: Spam Filter Pattern Matching"
- Next in thread: David K. Wall: "Re: regexp"
- Maybe reply: David K. Wall: "Re: regexp"
- Maybe reply: David K. Wall: "Re: regexp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]