Boost logo

Boost :

Subject: [boost] boost regex recursive quesion
From: ÎÂÎ÷²¨ (wenxibo_at_[hidden])
Date: 2015-03-23 05:04:02


This is my first time to using maillist

  I'm learning to use boost::regex for a month , a few days ago I found a problem( maybe is my mistake ?)

    

        I construct a simple recursive regular expression:

a(?0)?

This regex contains a recursive call (?0).

It should match a string with any arbitrary length filled with 'a' characters.
regex_match only returns true for "a" and "aa", but failed to match "aaa" and any string longer than three characters.

Why?


I try it on boost 1.45 and 1.57 , both get same result .


I had sent this question on stackoverflow , but had not get a answer now .


Is there any flag should be used with regex_match to use recursive call ?


Thank you .
                                               


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk