Subject: Re: [Boost-build] trim newlines
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-07-26 21:13:38
> I may have asked this before and, if so, I apologize for the
> Does anyone know a trick for trimming newlines off the end
> of a string in jam?
> I found a rule called strip-eol in tools/mpi.jam that
> claims to do this however it actually truncates the string at the first
> newline -- I only want to remove the last one and leave embedded ones
> strip-eol uses MATCH and, given the constraints on jam variables
> and the MATCH rule, it appears to be quite hard -- if even possible -- to
> do what I want only with regexps. If I could express a literal newline
> (e.g. n) in a regex then I could do it with something like this:
> "^(.*)[n]$" but I can't find a way to do that (so far).
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