How to avoid ctRegex (solved)
    ag0aep6g via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sun Aug 21 14:18:11 PDT 2016
    
    
  
On 08/21/2016 10:06 PM, cy wrote:
> in the module scope, you start with:
> auto pattern = ctRegex!"foobar";
>
> and you substitute with:
> typeof(regex("")) pattern;
> static this() {
>   pattern = regex("foobar");
> }
I may be missing the point here, but just putting `auto pattern = 
regex("foobar");` at module level works for me.
    
    
More information about the Digitalmars-d-learn
mailing list