Boost logo

Boost Users :

From: Roman Neuhauser (neuhauser_at_[hidden])
Date: 2006-08-09 12:47:33


# gast128_at_[hidden] / 2006-08-09 10:44:06 +0000:
> I want to misuse boost regex for pattern searching.

    That's what regular expressions are for, no? What abuse?

> The intermediate form will then be a string, but some of its
> characters can have multiple values, e.g:
>
> aaa
> aba
> aac
> abc
>
> Thus the string can be represented as a[a,b][a,c]. Still on this multiple
> string representation I want the full power of regular expressions, so
> I still want to search for aaa, or (a|b)* etc.
 
    I don't understand what you're trying to achieve. Are you trying to
    hide the fact that you're using boost::regex from the interface, so
    that you can do this?

    some_type anyofaababc(/* what should be here? */);
    assert(anyofaababc == "aaa");
    assert(anyofaababc == "aba");
    assert(anyofaababc == "aac");
    assert(anyofaababc == "abc");

    If so, what are you envisioning to construct those objects with
    if not regular expression literals? You'll end up using
    regex_match() in operator==() anyway, so again, what's the question
    exactly?

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net