I wrote two regexp:

--------------------
auto inlineCodeBlock = regex("`(.*?)`"); // -->  `(.*?)`
auto bigCodeBlock = regex("/`{3}[\\s\\S]*?`{3}/g"); // --> `{3}[\s\S]*?`{3}
--------------------
First for for selection inline code block. Second for multi-line:
--------------------
#Header
my header text

##SubHeader
my sub header text `foo inline code`

```
void foo()
{
   writeln("ppp");
}
```

###Sub3Header
my sub 3 text `bar inline code`

#Header2
my header2 text
--------------------

It's work fine in online editor https://regex101.com/r/EC5WRu/1 (sic! \\s\\S double escaped in D code).

But after compilation of code:

auto x = content.matchFirst(bigCodeBlock);
writeln(x);


print:
[]
[]

It's seems that D regexp work in another way. How can I test them?

Reply via email to