1. 7

Tyre is a set of combinators to build type-safe regular expressions, allowing automatic extraction and modification of matched groups.

Tyre is bi-directional: a typed regular expressions can be used for parsing and unparsing. It also allows routing, by providing a list of regexs/routes and their handlers.

  1.  

  2. 3

    This is neat, and a hell of a lot nicer than using capture groups to get a list of strings and then parsing them to their number type equivalents (or what not). Maybe libraries, for other languages, like this are already widespread and somehow I missed them, but this concept seems super useful.

    1. 2

      Pretty neat. I thought I had a paper on this topic but search turned up nothing. I accidentally found this while looking for it:

      https://ece.uwaterloo.ca/~vganesh/Publications_files/vg2011-HAMPI-TOSEM-Journal.pdf

      Apparently use regexes with constraint solvers to find SQL injections and problems in C code. Haven’t seen such a technique in my research. Adding it and Tyre to my collection.