[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: reverse find
- From: Torsten Karwoth <agonizer@...>
- Date: Thu, 26 Jan 2006 21:17:53 +0100
> On Jan 25, 2006, at 20:38, Torsten Karwoth wrote:
> > =string.match("another.filename.with.extension.as.extension","^.*(%..*
> >) $")
>
> What about file names which start with ".", but don't have an extension
> (e.g. ".svn", ".DS_Store", etc )?
>
> What would be a good pattern to avoid those?
...
> Better alternatives?
string.match has a 3rd. argument, 'init' ;-)
string.match(filename, "^.*(%..*)$", 2) should do (not tested).
Bye,
Torsten