Boost logo

Boost Users :

From: Michael Coles, MCDBA (admin_at_[hidden])
Date: 2006-04-07 19:37:02


I'm taking a look at http://www.boost.org/libs/regex/doc/captures.html but
I'm not seeing how to access the capture start location with match_extra?
I'll keep digging but if anyone out there knows of a shortcut to the answer,
it'd be appreciated.

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Lynn Allan
Sent: Friday, April 07, 2006 6:04 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Regex Submatch Position Question

If I understand your question, the snippet sample code related to "Captures"

can be adapted:
http://www.boost.org/libs/regex/doc/captures.html

HTH

----- Original Message -----
From: <admin_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.user
Sent: Friday, April 07, 2006 12:19 PM
Subject: Regex Submatch Position Question

> Hi all,
>
> Quick question about the Boost::Regex library. Is there a way to
> identify, with sub-matches, where a match in the search string is made and
> the length of the match? For instance, with the following regular
> expression and search string:
>
> Regex ==> "(\d+)"
> Search String ==> "Give me 100 dollars or give me 2001 dollars."
>
> Is there a way to determine that the subexpression matched at positions 8
> and 31 in the search string, and that the lengths of the matches were
> three and four characters?
>
> Thanks

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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