Fast regular expressions

Jascha Wetzel "[firstname]" at mainia.de
Sun Apr 15 12:52:42 PDT 2007


ah, ic. that will be parameterized later on so you can choose whether
to have the dot match it or not.
you can easily patch it into the alpha by changing charclass.d line 76 to
static const CharClass!(char_t) any_char = {parts: [{l:32, r:127},
{l:10,r:10}, {l:13,r:13}]};


Aziz K. wrote:
>> what exactly do you mean by "over new-lines"?
>> phobos' regexps will match newlines if stated explicitly. it can also
>> treat the input as multiple lines.
> 
> What I mean is that the dot meta character in Phobos' regexps doesn't
> match a new-line.
> For example:
> 
> char[] s = "<p>ab\ncd</p>";
> auto m = search(s, "<p>(.+)</p>", "gmi");
> writefln(m.match(1)); // no match...
> 
>> my engine doesn't care about special chars, yet. the point is merely to
>> improve on the algorithmic side. all the details with assertions,
>> special chars and charsets will be filled in when all the operators work.
> 
> Yeah, I noticed that when I looked through your code a bit.



More information about the Digitalmars-d mailing list