diff --git a/server.js b/server.js index 01cad87..41d550c 100644 --- a/server.js +++ b/server.js @@ -81,6 +81,13 @@ server.post("/regex", bodyParser.json(), function (inReq, inRes) Postgres.FirstRow(sql, [JSON.stringify(inReq.body)], inRes); }); +//takes an ad-hoc regex definition in curly braces +server.get("/regex_test", bodyParser.json(), function (inReq, inRes) +{ + var sql = "SELECT x.message FROM tps.test_regex_recs($1::jsonb) as x(message)"; + Postgres.FirstRow(sql, [JSON.stringify(inReq.body)], inRes); +}); + //------------------------------------------------------------mappings--------------------------------------------------------------------------------------------------------------------------------- //list unmapped items flagged to be mapped ?srce=