in reply to Re: my code error-ing out trying to grab html
in thread my code error-ing out trying to grab html
On the other hand: should you really be using a regex for this at all?#!/usr/bin/perl -w use strict; my $row = "Updated: Mar-11 23:05:50 PST"; if($row =~ /Updated\s*: #The String "Updated", followed b +y zero or more spaces, then a colon \s*\w+\s*-\s*\d{1,2}\s* #This matches " Mar-11 " \d{1,2}:\d{1,2}:\d{1,2} #The time \s*PST/x) { #The timezone - do you really nee +d to be this specific? print "Match\n"; } else { print "No Match\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: my code error-ing out trying to grab html
by zengargoyle (Deacon) on Mar 12, 2002 at 09:54 UTC |