Fixing the API of std.regex
Dmitry Olshansky
dmitry.olsh at gmail.com
Tue Mar 12 09:12:01 PDT 2013
12-Mar-2013 19:08, Nick Sabalausky пишет:
> On Tue, 12 Mar 2013 11:06:56 -0400
> Nick Sabalausky <SeeWebsiteToContactMe at semitwist.com> wrote:
>>
>> matchFirst
>> matchAll
>> matchTest
>>
>> ?
>>
>
> s/matchTest/isMatch/
>
or rather 'hasMatch'
But that's too obvious :)
The problem is that I wanted to avoid creating a bunch of new names,
especially as they are tweaks/option on the original behavior.
I'd go with direct enum flags but it's a bit too verbose:
match("blah-bleh", "bl[ae]h", Match.all); //Match.first
That's why I've thought to see a way to get any of
match.all(...) or match(...).all working. And that is possible, but not
with replace.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list