DMD 0.148 - regular expressions
Johan Granberg
lijat.meREM at OVEgmail.com
Sun Feb 26 11:02:45 PST 2006
Walter Bright wrote:
> "Lars Ivar Igesund" <larsivar at igesund.net> wrote in message
> news:dts47r$14c0$1 at digitaldaemon.com...
>> I liked the idea (match expressions), just not the operator, and I thought
>> that was a common opinion...
>
> if ("regex" ~~ "string")
> _match. ...
>
> The equivalent functionality can now be done with:
>
> if (m; search("string", "regex"))
> m. ...
>
Why not do like this instead?
if (m;"regex" ~~ "string")
m. ...
That would get rid of the implicit declaration of _match and just like
usual with statements the result of ~~ could bee ignored.
More information about the Digitalmars-d
mailing list