Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-07-02 14:10:53


"David Abrahams" wrote:

> I appreciate the convenience of such an interface, I really do, but
> doesn't this design just compound the "fat interface" problems that
> std::string already has?
>
> Even Python's string, which has a *lot* built in, doesn't try to
> handle the regex stuff directly.
>

While Ruby has technically separate class for Regex
its syntax makes it look as a part of string:

# switch on string with regex
s = "a string"
case s
when /a*/: print "something\n"
...
end

# match of string with regex
/^a*/ =~ "aa"

/Pavel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk