Public repository: timo / feel

Reader

An interpreter of FEEL, written in Rust, with integrations for PostgreSQL, WASM, Lua, and Python.

1
[
2
  {
3
    "id": "1109-feel-replace-function:001_7637e5a8ed:feel-replace-function_001_7637e5a8ed",
4
    "expression": "replace(\"abcd\",\"(ab)|(a)\", \"[1=$1][2=$2]\")",
5
    "expected": "[1=ab][2=]cd",
6
    "expected_type": "string",
7
    "comparison": "exact",
8
    "deviation": null
9
  },
10
  {
11
    "id": "1109-feel-replace-function:002_b5c242ccd4:feel-replace-function_002_b5c242ccd4",
12
    "expression": "replace(\"a\",\"[b-z]\",\"#\")",
13
    "expected": "a",
14
    "expected_type": "string",
15
    "comparison": "exact",
16
    "deviation": null
17
  },
18
  {
19
    "id": "1109-feel-replace-function:003_bf7aa95050:feel-replace-function_003_bf7aa95050",
20
    "expression": "replace(\"a\",\"[a-z]\",\"#\")",
21
    "expected": "#",
22
    "expected_type": "string",
23
    "comparison": "exact",
24
    "deviation": null
25
  },
26
  {
27
    "id": "1109-feel-replace-function:004_55a2186006:feel-replace-function_004_55a2186006",
28
    "expression": "replace(\"abc\",\"def\",\"#\")",
29
    "expected": "abc",
30
    "expected_type": "string",
31
    "comparison": "exact",
32
    "deviation": null
33
  },
34
  {
35
    "id": "1109-feel-replace-function:005_271d93aa68:feel-replace-function_005_271d93aa68",
36
    "expression": "replace(\"abc\",\"e\",\"#\")",
37
    "expected": "abc",
38
    "expected_type": "string",
39
    "comparison": "exact",
40
    "deviation": null
41
  },
42
  {
43
    "id": "1109-feel-replace-function:006_9cd005d2e2:feel-replace-function_006_9cd005d2e2",
44
    "expression": "replace(\"foobar\",\"^fo*b*\",\"#\")",
45
    "expected": "#ar",
46
    "expected_type": "string",
47
    "comparison": "exact",
48
    "deviation": null
49
  },
50
  {
51
    "id": "1109-feel-replace-function:007_91583e38c9:feel-replace-function_007_91583e38c9",
52
    "expression": "replace(\"abc\",\".^[d-z]\",\"#\")",
53
    "expected": "abc",
54
    "expected_type": "string",
55
    "comparison": "exact",
56
    "deviation": null
57
  },
58
  {
59
    "id": "1109-feel-replace-function:008_8c7c3871f8:feel-replace-function_008_8c7c3871f8",
60
    "expression": "replace(\"abracadabra\",\"bra\",\"*\")",
61
    "expected": "a*cada*",
62
    "expected_type": "string",
63
    "comparison": "exact",
64
    "deviation": null
65
  },
66
  {
67
    "id": "1109-feel-replace-function:009_b1e4220bc9:feel-replace-function_009_b1e4220bc9",
68
    "expression": "replace(\"abracadabra\",\"a.*a\",\"*\")",
69
    "expected": "*",
70
    "expected_type": "string",
71
    "comparison": "exact",
72
    "deviation": null
73
  },
74
  {
75
    "id": "1109-feel-replace-function:010_cd4e7a6d9f:feel-replace-function_010_cd4e7a6d9f",
76
    "expression": "replace(\"abracadabra\",\"a.*?a\",\"*\")",
77
    "expected": "*c*bra",
78
    "expected_type": "string",
79
    "comparison": "exact",
80
    "deviation": null
81
  },
82
  {
83
    "id": "1109-feel-replace-function:011_c310665f57:feel-replace-function_011_c310665f57",
84
    "expression": "replace(\"abracadabra\",\"a\",\"\")",
85
    "expected": "brcdbr",
86
    "expected_type": "string",
87
    "comparison": "exact",
88
    "deviation": null
89
  },
90
  {
91
    "id": "1109-feel-replace-function:012_b0cf9e6723:feel-replace-function_012_b0cf9e6723",
92
    "expression": "replace(\"abracadabra\",\"a(.)\",\"a$1$1\")",
93
    "expected": "abbraccaddabbra",
94
    "expected_type": "string",
95
    "comparison": "exact",
96
    "deviation": null
97
  },
98
  {
99
    "id": "1109-feel-replace-function:013_f669d03fa9:feel-replace-function_013_f669d03fa9",
100
    "expression": "replace(\"AAAA\",\"A+\",\"b\")",
101
    "expected": "b",
102
    "expected_type": "string",
103
    "comparison": "exact",
104
    "deviation": null
105
  },
106
  {
107
    "id": "1109-feel-replace-function:014_cea33baeee:feel-replace-function_014_cea33baeee",
108
    "expression": "replace(\"AAAA\",\"A+?\",\"b\")",
109
    "expected": "bbbb",
110
    "expected_type": "string",
111
    "comparison": "exact",
112
    "deviation": null
113
  },
114
  {
115
    "id": "1109-feel-replace-function:015_57ce78ec8a:feel-replace-function_015_57ce78ec8a",
116
    "expression": "replace(\"darted\",\"^(.*?)d(.*)$\",\"$1c$2\")",
117
    "expected": "carted",
118
    "expected_type": "string",
119
    "comparison": "exact",
120
    "deviation": null
121
  },
122
  {
123
    "id": "1109-feel-replace-function:016_1c38095f50:feel-replace-function_016_1c38095f50",
124
    "expression": "replace(\"reluctant\",\"r.*?t\",\"X\")",
125
    "expected": "Xant",
126
    "expected_type": "string",
127
    "comparison": "exact",
128
    "deviation": null
129
  },
130
  {
131
    "id": "1109-feel-replace-function:017_b9c3c03b87:feel-replace-function_017_b9c3c03b87",
132
    "expression": "replace(\"0123456789\",\"(\\d{3})(\\d{3})(\\d{4})\",\"($1) $2-$3\")",
133
    "expected": "(012) 345-6789",
134
    "expected_type": "string",
135
    "comparison": "exact",
136
    "deviation": null
137
  },
138
  {
139
    "id": "1109-feel-replace-function:018_aba3349043:feel-replace-function_018_aba3349043",
140
    "expression": "replace(\"facetiously\",\"[iouy]\",\"[$0]\")",
141
    "expected": "facet[i][o][u]sl[y]",
142
    "expected_type": "string",
143
    "comparison": "exact",
144
    "deviation": null
145
  },
146
  {
147
    "id": "1109-feel-replace-function:019_6ef91033ad:feel-replace-function_019_6ef91033ad",
148
    "expression": "replace(\"abc\",\"[a-z]\",\"#\",\"\")",
149
    "expected": "###",
150
    "expected_type": "string",
151
    "comparison": "exact",
152
    "deviation": null
153
  },
154
  {
155
    "id": "1109-feel-replace-function:020_52d93a8851:feel-replace-function_020_52d93a8851",
156
    "expression": "replace(\"a.b.c.\",\"[a-z]\",\"#\",\"s\")",
157
    "expected": "#.#.#.",
158
    "expected_type": "string",
159
    "comparison": "exact",
160
    "deviation": null
161
  },
162
  {
163
    "id": "1109-feel-replace-function:021_e33828e3da:feel-replace-function_021_e33828e3da",
164
    "expression": "replace(\"abc\",\"[A-Z]\",\"#\",\"i\")",
165
    "expected": "###",
166
    "expected_type": "string",
167
    "comparison": "exact",
168
    "deviation": null
169
  },
170
  {
171
    "id": "1109-feel-replace-function:022_bd75fac0bd:feel-replace-function_022_bd75fac0bd",
172
    "expression": "replace(\"abc\",\"[a-z]\",\"#\",\"s\")",
173
    "expected": "###",
174
    "expected_type": "string",
175
    "comparison": "exact",
176
    "deviation": null
177
  },
178
  {
179
    "id": "1109-feel-replace-function:023_5c337d3725:feel-replace-function_023_5c337d3725",
180
    "expression": "replace(\"a b c d \",\"[a-z]\",\"#\",\"x\")",
181
    "expected": "# # # # ",
182
    "expected_type": "string",
183
    "comparison": "exact",
184
    "deviation": null
185
  },
186
  {
187
    "id": "1109-feel-replace-function:024_4a89220cd6:feel-replace-function_024_4a89220cd6",
188
    "expression": "replace(\"abc\",\".^[d-z]*\",\"smix\")",
189
    "expected": "abc",
190
    "expected_type": "string",
191
    "comparison": "exact",
192
    "deviation": null
193
  },
194
  {
195
    "id": "1109-feel-replace-function:025_b7f9525875:feel-replace-function_025_b7f9525875",
196
    "expression": "replace(input:\"abc\",pattern:\"[a-z]\",replacement:\"#\")",
197
    "expected": "###",
198
    "expected_type": "string",
199
    "comparison": "exact",
200
    "deviation": null
201
  },
202
  {
203
    "id": "1109-feel-replace-function:026_acb176590a:feel-replace-function_026_acb176590a",
204
    "expression": "replace(input:\"abc\",pattern:\"[A-Z]\",replacement:\"#\",flags:\"\")",
205
    "expected": "abc",
206
    "expected_type": "string",
207
    "comparison": "exact",
208
    "deviation": null
209
  },
210
  {
211
    "id": "1109-feel-replace-function:027_d8d25f40e5:feel-replace-function_027_d8d25f40e5",
212
    "expression": "replace(input:\"abc\",pattern:\"[A-Z]\",replacement:\"#\",flags:\"i\")",
213
    "expected": "###",
214
    "expected_type": "string",
215
    "comparison": "exact",
216
    "deviation": null
217
  },
218
  {
219
    "id": "1109-feel-replace-function:028_96e8c698af:feel-replace-function_028_96e8c698af",
220
    "expression": "replace(input:\"abc\",pattern:\".^[d-z]*\",replacement:\"#\",flags:\"smix\")",
221
    "expected": "abc",
222
    "expected_type": "string",
223
    "comparison": "exact",
224
    "deviation": null
225
  }
226
]