re2d 0.1.0

RE2 for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

re2d

linux Dub version

D language binding of RE2 regex engine.

This is not an officially supported Google product.

Usage

/+ dub.json:
{
  "dependencies": {
     "re2d": "*"
  },
  "libs": ["re2", "c++"]
}
+/
import re2d;

@nogc nothrow pure unittest {
  int i;
  StringPiece s;
  assert(RE2.FullMatch("γƒ«γƒ“γƒΌπŸ’Ž:1234", `([^:]+):(\d+)`, &s, &i));
  assert(s.toString == "γƒ«γƒ“γƒΌπŸ’Ž");
  assert(i == 1234);
}

You need to install RE2 library in $LIBRARY_PATH and $LD_LIBRARY_PATH before building.

See re2.d unittests for more runnable examples.

Authors:
  • Shigeki Karita
Dependencies:
none
Versions:
0.1.0 2021-Aug-17
~master 2023-Aug-06
~ShigekiKarita-ubuntu-latest 2023-Aug-06
~ShigekiKarita-gdc 2023-Aug-06
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 10 downloads total

Score:
1.9
Short URL:
re2d.dub.pm