Boost logo

Boost-Build :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2006-10-07 14:43:32


Johan Nilsson wrote:
> Is it really possible to split, e.g.:
>
> o = "one
> two
> three" ;
>
> so that $(xs) equals one two three , using the nl definition above in a
> regex? This is what I've tried, but it seems to get stuck in an endless
> loop:

Not with the regex engine built into bjam. It's a greedy implementation
that tail matches. The regex.split gets around that by doing multiple
MATCH calls to successively get the tail elements one at a time. A regex
split is a much needed builtin, as it would use less memory than the
regex.split rule. Anyone care to contribute ;-)

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk