Boost logo

Boost Users :

Subject: Re: [Boost-users] [Regex] Problem with optionality operator
From: John Maddock (john_at_[hidden])
Date: 2009-09-18 06:33:19


> ./regex_test "Iphone"
> Output: No Match and Partial Match (Why is that? "Apple" is optional
> should only be "Partial Match")

No leading space in front of the "Iphone" compared to the regex which
requires it as written.

> ./regex_test "Iphone 3g"
> Output: No Match and Partial Match (Why is that? "Apple" is optional
> should be "Full Match")

As above, your regex has a literal space in it which is not in the text.

John.


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