regex + sbackup

Darryl Clarke smartssa at gmail.com
Wed Feb 15 02:02:31 UTC 2006


On 14/02/06, dave s <ubuntu at pusspaws.net> wrote:
> On Tuesday 14 Feb 2006 23:05, Darryl Clarke wrote:
> > On 14/02/06, dave s <ubuntu at pusspaws.net> wrote:
> > > > > > /home/[^/]+?/\.thumbnails
> > > > >
> > > > > /home/dave/test/^data$
> > > >
> > > > /home/[^/]+?/\data
> > >
> > > /home/dave/test/[^/]+?/\data
> >
> > [snipped a bunch of stuff]
> >
> > In the first example the \.thumbnails the \ is escaping the . in
> > .thumbnails it is not required in the samples that include data.
> >
> > /home/dave/test/[^/]+?/data
> >
> > should be the proper regex.
> >
> > --
> > ~ Darryl  ~ smartssa at gmail.com
> > ~ http://darrylclarke.com
>
> I see your point, tried
>
> /home/dave/test/[^/]+?/data
>
> unfortunately same problem, not excluded
>

Wait, is the data path:
/home/dave/test/something/data
or
/home/dave/test/data?

If it's the second, it's no wonder it didn't work ;)

try:
/home/dave/[^/]+?/data

this will exclude
/home/dave/[anything]/data
but not
/home/dave/data
or
/home/dave/[anything]/[something]/data

I think this:
/home/dave/[.]+?/data

should exclude
/home/dave/[anything/including/subfolders]/data

but still not
/home/dave/data

I don't think you're experiencing a bug, just some regex trickery.

--
~ Darryl  ~ smartssa at gmail.com
~ http://darrylclarke.com




More information about the ubuntu-users mailing list