DMD 0.148 - regular expressions

Walter Bright newshound at digitalmars.com
Sun Feb 26 10:04:54 PST 2006


"Lars Ivar Igesund" <larsivar at igesund.net> wrote in message 
news:dtso8j$1r01$1 at digitaldaemon.com...
> You are of course correct in this, but it in my (quite so erratic at 
> times)
> mind, this meant that the syntax probably would be changed, not removed
> altoghether. Also, I don't really think the D as Script feature makes much
> sense without some additional regexy sugar, even if it is still quite
> usable of course.

It's still there in the form:

    if (m; search("string", "pattern"))
        ... do something with m.match(0) ...

as opposed to:

    if ("pattern" ~~ "search")
        ... do something with _match.match(0) ...

There isn't much sugar to the latter over the former, and it has the 
disadvantage of implicit declarations, which in general are a bad idea. 





More information about the Digitalmars-d mailing list