tps/test.pgsql

40 lines
891 B
Plaintext
Raw Normal View History

2018-12-09 14:52:56 -05:00
select jsonb_pretty(x.r) from tps.test_regex_recs(
$$
{
"name": "Trans Type",
"srce": "PNCC",
"regex": {
"function": "extract",
"defn": [
{
"key": "{AccountName}",
"map": "y",
"field": "acctn",
"regex": "(.*)",
"retain": "n"
},
{
"key": "{Transaction}",
"map": "y",
"field": "trans",
"regex": "(.*)",
"retain": "n"
},
{
"key": "{Description}",
"map": "y",
"field": "ini",
"regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)",
"retain": "y"
}
],
"where": [
{}
]
},
"sequence": 1
}
$$::jsonb
) x(r)
limit 1