lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The point is that there is no single pattern that can match both Windows
and Unix style paths. I discover what OS I'm on by looking for Windows
specific environment variables, and adjust the pattern accordingly.

steve d.

On Thu, Apr 3, 2008 at 12:04 AM, Miles Bader <miles@gnu.org> wrote:
> "steve donovan" <steve.j.donovan@gmail.com> writes:
>  > The only really reliable method is not to use patterns; use
>  > p:sub(i,i) for i = #p,1 and check for slash/backslash.
>  >
>  > A similar problem involves finding extensions; Linux paths
>  > are full of dots that don't mean extensions!
>
>  Eh?  Why do you think "the only reliable way is not to use patterns"?
>
>  -Miles
>
>  --
>  Neighbor, n. One whom we are commanded to love as ourselves, and who does all
>  he knows how to make us disobedient.
>