From: Thaddeus L. Olczyk (olczyk_at_[hidden])
Date: 2003-05-05 20:29:51
On Mon, 05 May 2003 18:47:15 -0400, Edward Diener
>Use regex_grep to find matches and then regex_format in the Predicate
>function to change each match to another value.
Excuse me, but I see no place in the documentation where it describes
a format string which says something like " take all of the string
sans subexpression and set the subexpressions to xxxx".
Without that type of format string I do not see any way that
regex_format can do that.
>Thaddeus L. Olczyk wrote:
>> I've been searching the documentation for way to do regular expression
>> substitition of groups.
>> For example: Given the regex;
>> "My[ ]+name[ ]+is[ ]+($NAME)[.]+
>> I[ ]+live[ ]+at[ ]+($ADDRESS)[.]+
>> My[ ]+email[ ]+address[ ]+is[ ]+($EMAIL)"
>> I search some string for a match, find this:
>> "My name is $NAME . I live at $ADDRESS.
>> I am an acountant. My email address is $EMAIL"
>> and want to substitute
>> "Bob Smith" for $NAME
>> "1600 Pensylvania Ave." for $ADDRESS
>> "bob_at_[hidden]" for $EMAIL.
>Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thaddeus L. Olczyk
Think twice, code once.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk