add a macro for regular expressions for tests and add an example for netlib