From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-07-26 06:08:36
> I've been toying around with an alternate, more concise syntax for
>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
>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...
- John Maddock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk