|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2006-01-05 18:28:48
Bjørn Roald wrote:
>
> When we discuss the issue of string literals, do you have any suggestion of
> how to best match string literals static regexp
>
<untested>
sregex quoted =
'"' // open quote
>> keep( // turn off backtracking
*( // zero or more ...
~(set= '\\', '"') // chars that are not quote or escape
| // or
'\\' >> _ // an escaped char
)
)
>> '"'; // close quote
</untested>
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk