From: RKA Date: 2013-02-15T09:45:58+09:00 Subject: Re: if file exists then move --e89a8f502e02b0d89704d5b8b2ad Content-Type: text/plain; charset=ISO-8859-1 yes! You want to use a regex. May I suggest something like: /hist_sar\d+-\d+-\d+\.tar/ On Thu, Feb 14, 2013 at 3:59 PM, Sloan Ruby wrote: > I have been googling and am not sure how to approach this. I have a > file that I need to match. The date string in the filename varies so I > want to match any date. > > /path/to/file/hist_sar01-31-2013.tar > > What options do i have for matching the/any date or string. Is there a > method for matching? > > hist_sar*.tar > > -- > Posted via http://www.ruby-forum.com/. > > --e89a8f502e02b0d89704d5b8b2ad Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
yes! You want to use a regex. May I suggest something like= : /hist_sar\d+-\d+-\d+\.tar/


On Thu, Feb 14, 2013 at 3:59 PM, Sloan Ruby <list= s@ruby-forum.com> wrote:
I have been googling and am not sure how to = approach this. =A0I have a
file that I need to match. =A0The date string in the filename varies so I want to match any date.

/path/to/file/hist_sar01-31-2013.tar

What options do i have for matching the/any date or string. =A0Is there a method for matching?

hist_sar*.tar

--
Posted via http://= www.ruby-forum.com/.


--e89a8f502e02b0d89704d5b8b2ad--