Boost logo

Boost Users :

From: Jean-Sebastien Vachon (js.vachon_at_[hidden])
Date: 2006-04-12 21:57:42


On Wed, 12 Apr 2006 16:30:26 -0600, Lynn Allan wrote:

> Homework?
> What have you tried .... with what results?
>
> Jean-Sebastien Vachon wrote:
>> Hi there,
>>
>> I am sure what I am looking for exist somewhere but I haven't
>> been able to find anything that works in boost::regex.
>>
>> What I am looking for is a regular expression that will validate
>> a filename according to the specification of the OS (UNIX systems
>> and Windows).
>>
>> I would be very grateful if someone could provide me with
>> these two expressions (one for Linux and one for Windows).
>>
>> Later,

Ok my latest version for Windows is:

((((((^([a-z^[.space.]]:\\?)?)|(^\\\\[^\\/;:\'\"<>]+\\[^\\]+\\)))))
(((([^\\;/:\'\"<>]+)\\)*)*)((([^\\;:/\'\"<>[.period.]]*))
([[.period.]]([^\\:;/\'\"<>]+))?))

so far, all the tests I did were succesful in Visual REGEXP.
However, I still have one case that is problematic in boost using
this expression.

I believe the expression should match "C:" but it does not (in boost)

Can someone spot the error? I believe I am very close of succeeding.

Thanks all for your valuable help (and time)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net