Evaluating Regular Expressions at compile time in D

277 Views Asked by At

Is there a way to evaluate regular expressions in D, at compile time?

1

There are 1 best solutions below

8
On

Use a static variable of type std.regex.ctRegex.

http://dlang.org/phobos/std_regex.html#ctRegex