On Jul 25, 2014, at 9:54 AM, Chris Knipe wrote:

> Hi All,
>  
> I have the odd (very rare) case where I am given a date in an incorrect 
> format.  I already use Date::Parse to convert the dates to a unix timestamp, 
> and it’s working incredibly well.  However, on the rare case that I get 
> incorrect dates, Date::Parse does not like them either and errors out.  The 
> formats in question that I can’t parse basically looks like
>  
> Thu, 23 Oct 2008 12:06:48+0400
>  
> Note the lack of a space between the seconds and the timezone.
>  
> Is there a simple quick way to fix that by means of a regex?

The simplest way to fix that particular error might be this regex:

  s/(\d)([+-])/$1 $2/



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to