Eric Niebler wrote:
>'ll second the suggestion to look into xpressive. With xpressive, you
>can refer to one regex from another. And with the latest version (in the
>Boost Sandbox) you can put your list of cities into a symbol table and
>get very fast look-up -- much better than just a bunch of alternates.

Ok, I've taken a look and that doesn't seem to be what I need afteral.
The regexp used must use the Perl semantic and are only known at
runtime, so I would go for what you call dynamic expressions, however I'm not sure I see
how I can use your symbol table neat trick with those, unless they are
disconnected. I.e. I can easily translate
"in (CITY) on westbrook"
into
sregex leftre = 'in';
sregex rightre = 'on westbrook';
sregex re = leftre >> (city_map) >> rightre;

but what to do with
"in (CITY|heaven) on westbrook" ?

          /jog

        /jog