|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-07-26 10:18:05
At 07:08 AM 7/26/2001, John Maddock wrote:
>
>> I've been toying around with an alternate, more concise syntax
for
>common
>>regular expression operations. Perl is a personal favorite for string
>>manipulation, so I've partially mimicked its syntax as an add-on module
to
>
>>regex. I rarely find that I require more than these simple operations
>(match
>>and sed-like replace).
>
>Doug, I think this is beginning to grow on me a little - I hadn't thought
>of using operator overloading to simulate the /expression/format/ perl
>syntax, I would be interested if there are any perl guru's around here,
and
>what they think.
>
>BTW you could extend the operator overloading a little to handle strings
as
>arguments (as well as precompileed regex's), I wonder if it's possible to
>to overload operator=~ or failing that a binary operator~, or failing
that
>how about operator>> for the string part:
>
>boost success = mystring >> myregex
>std::string s = mystring >> myregex/myformat
>
>I'm not sure if this is better or worse though...
Interesting!
But I'm having trouble seeing the big picture. How does this relate to
Darin Adler's http://groups.yahoo.com/group/boost/files/string_algorithm/
stuff?
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk