DMD 0.148 - regular expressions

Tom Tom_member at pathlink.com
Sun Feb 26 11:46:41 PST 2006


In article <op.s5lhaxyb6b8z09 at ginger.vic.bigpond.net.au>, Derek Parnell says...
>
>On Mon, 27 Feb 2006 04:58:21 +1100, Walter Bright  
><newshound at digitalmars.com> 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. ...
>
>I don't think that is quite correct. This program failed to compile ....
>
>   void main()
>   {
>     if (m; search("string", "regex")) {}
>   }
>
>
>I got the messages ...
>   test2.d(3): undefined identifier search
>   test2.d(3): function expected before (), not search of type int
>
>It turns out that "import std.regexp;" is now required.

This was pretty obvious IMO, don't you think so? :) I mean, if the feature was
removed, of course, you would require 'std.regexp' imported again. I think
Walter omitted it because of that.

Tom;



More information about the Digitalmars-d mailing list