Boost logo

Boost :

From: Stephen Nuchia (snuchia_at_[hidden])
Date: 2008-04-10 10:36:05


mitya_at_stamford:~$ perl -e '$in = "1111"; $in =~ s/(.*)/0$1/; print
$in."\n"'
01111
mitya_at_stamford:~$

The s/... construct by default replaces only the first match. You need
to set the corresponding flag in your code:

http://www.boost.org/doc/libs/1_35_0/libs/regex/doc/html/boost_regex/ref
/regex_replace.html

        "If the flag format_first_only is set then only the first
occurrence is replaced [...]"


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