non halting regex

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat Mar 27 08:14:10 PDT 2010


Is this program expected to terminate?
D 2.042

module test;

import std.regex;
import std.stdio;

void main(){
     foreach(m; match("hello world",`.*`)){
         writefln("%s[%s]%s",m.pre,m.hit,m.post);
     }
}


More information about the Digitalmars-d-learn mailing list