-
Notifications
You must be signed in to change notification settings - Fork 2
/
regex_generating_strings_v3.pi
258 lines (196 loc) · 17.2 KB
/
regex_generating_strings_v3.pi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/*
Regex in reverse - decompose regular expressions in Picat v3.
From codegolf:
Regex in reverse - decompose regular expressions
https://codegolf.stackexchange.com/questions/25378/regex-in-reverse-decompose-regular-expressions
"""
The Problem
I have a bunch of regular expressions that I need to use in some code, but I'm
using a programming language that doesn't support regex! Luckily, I know that the
test string will have a maximum length and will be composed of printable ASCII only.
The Challenge
You must input a regex and a number n, and output every string composed of printable
ASCII (ASCII codes 32 to 126 inclusive, to ~, no tabs or newlines) of length less than or
equal to n that matches that regex. You may not use built-in regular expressions or
regex matching functions in your code at all. Regular expressions will be limited to
the following:
* Literal characters (and escapes, which force a character to be literal, so \.
is a literal ., \n is a literal n (equivalent to just n), and \w is equivalent
to w. You do not need to support escape sequences.)
* . - wildcard (any character)
* Character classes, [abc] means "a or b or c" and [d-f] means anything from d to f
(so, d or e or f). The only characters that have special meaning in a character
class are [ and ] (which will always be escaped, so don't worry about those),
\ (the escape character, of course), ^ at the beginning of the character class
(which is a negation), and - (which is a range).
* | - the OR operator, alternation. foo|bar means either foo or bar, and (ab|cd)e
matches either abe or cde.
* * - match the previous token repeated zero or more times, greedy (it tries to
repeat as many times as possible)
* + - repeated one or more times, greedy
* ? - zero or one times
* Grouping with parentheses, to group tokens for |, *. +, or ?
The input regex will always be valid (i.e., you do not have to handle input like
?abc or (foo or any invalid input). You may output the strings in any order
you would like, but each string must appear only once (don't output any
duplicates).
The Test Cases
Input: .*, 1
Output: (empty string), , !, ", ..., }, ~
Input: w\w+, 3
Output: ww, www
Input: [abx-z][^ -}][\\], 3
Output: a~\, b~\, x~\, y~\, z~\
Input: ab*a|c[de]*, 3
Output: c, cd, ce, aa, cde, ced, cdd, cee, aba
Input: (foo)+(bar)?!?, 6
Output: foo, foo!, foofoo, foobar
Input: (a+|b*c)d, 4
Output: ad, cd, aad, bcd, aaad, bbcd
Input: p+cg, 4
Output: pcg, ppcg
Input: a{3}, 4
Output: a{3}
The Winner
This is code-golf, so the shortest code in bytes will win!
"""
This Picat model was created by Hakan Kjellerstrand, [email protected]
See also my Picat page: http://www.hakank.org/picat/
*/
import util.
main => go.
go ?=>
% generate_string("w\\w+", 3,S),
generate_string("[abx-z][^ -}][\\\\]", 3, S),
println(s=S),
fail,
nl.
go => true.
% See mankell.pi and mankell_v3.pi
% (Same result, but in different order)
go2 ?=>
% Kjellerstrand (48)
println("kjellerstrand:"),
K = findall(S,generate_string("k(je|ä)ll(er|ar)?(st|b)r?an?d",15,S)),
println(K),
println(len=K.len),
nl,
% Henning Mankell (1296)
println("henning mankell"),
M = findall(S,generate_string("[hm][ea](nk|n|nn)(ing|ell|all) [hm][ea](nk|n|nn)(ing|ell|all)",15,S)),
% println(M),
println(len=M.len),
nl.
go2 => true.
% The tests.
% Correct words but not always in correct order
go3 ?=>
Tests = [
[".*", 1, "(empty string), , !, \", ..., }, ~"],
["w\\w+", 3, "ww, www"],
["[abx-z][^ -}][\\\\]", 3,"a~\\, b~\\, x~\\, y~\\, z~\\"],
["ab*a|c[de]*", 3, "c, cd, ce, aa, cde, ced, cdd, cee, aba"],
["(foo)+(bar)?!?", 6,"foo, foo!, foofoo, foobar"],
["(a+|b*c)d", 4, "ad, cd, aad, bcd, aaad, bbcd"],
["p+cg", 4, "pcg, ppcg"],
["a{3}", 4, "a{3}"],
["price[1234]",10,"price1, price2, price3, price4"],
["[a-c][a-c][a-c]",6,"aaa, aab, aac, aba, abb, abc, aca, acb, acc, baa, bab, bac, bba, bbb, bbc, bca, bcb, bcc, caa, cab, cac, cba, cbb, cbc, cca, ccb, ccc"], % hakank
["a(l(la?)?|n(anas|n(as?)?)?)?",20,"a, al, all, alla, an, ananas, ann, anna, annas"],
["(a|[bpk]a)lla",10,"alla, balla, kalla, palla"],
["(a(nd|t)|do|end|for|i[ns]|not|o[fr]|use)",10,"and, at, do, end, for, in, is, not, of, or, use"],
% Generating all combinations of a, b, and c of length N.
["(a|b|c)+",3,"a, b, c, aa, ab, ac, ba, bb, bc, ca, cb, cc, aaa, aab, aac, aba, abb, abc, aca, acb, acc, baa, bab, bac, bba, bbb, bbc, bca, bcb, bcc, caa, cab, cac, cba, cbb, cbc, cca, ccb, ccc"]
],
foreach([Regex,N,Check] in Tests)
println([regex=Regex,n=N,check=Check]),
All=findall(S,generate_string(Regex, N, S)).sort().join(", "),
println(All),
if All == Check then
println(ok)
else
println(not_ok)
end,
nl
end,
nl.
go3 => true.
go4 ?=>
worldle_regexp(Regex),
N = 5,
All=findall(S,generate_string(Regex, N, S)),
println(all=All),
println(All.len),
nl.
go4 => true.
%
% Prolog solution by ankh-morpork (adjusted to Picat by hakank)
% From
% https://codegolf.stackexchange.com/questions/25378/regex-in-reverse-decompose-regular-expressions
%
% Prolog, ungolfed
%
generate_string(R, L, S) :-
% parse regex
% string_codes(R, RC),
RC = to_codes(R), % hakank
regex_union(RE, RC, []),
% bound string length
between(0, L, M),
bp.length(SC, M), % hakank
% find string
match(SC, RE, []),
% string_codes(S, SC).
S = [chr(C) : C in SC]. % hakank
% Parsers
%%%%%%%%%
regex_union(R) -->regex_concat(S), regex_union1(S, R).
regex_union1(R,T) --> [124], regex_concat(S), regex_union1($regex_union(R,S), T).
regex_union1(R, R) --> [].
regex_concat(R) --> regex_op(S), regex_concat1(S, R).
regex_concat1(R, T) --> regex_op(S), regex_concat1($regex_concat(R,S), T).
regex_concat1(R, R) --> [].
regex_op(regex_kleene(R)) --> regex_lit(R), [42].
regex_op(regex_concat(R,regex_kleene(R))) --> regex_lit(R), [43].
regex_op(regex_union(regex_empty,R)) --> regex_lit(R), [63].
regex_op(R) --> regex_lit(R).
regex_lit(regex_char([C])) --> [C], {\+ regex_ctrl(C)}.
regex_lit(regex_char([C])) --> [92], [C].
regex_lit(regex_char(CS)) --> [46],
% {findall(C, between(32,126, C), CS)}.
{CS = findall(C, between(32,126, C))}. % hakank
regex_lit(regex_char(DS)) -->
[91], [94], !, class_body(CS), [93],
% {findall(C, (between(32, 126, C), \+ member(C, CS)), DS)}.
{DS = findall(C, (between(32, 126, C), \+ member(C, CS)))}. % hakank
regex_lit(regex_char(CS)) --> [91], class_body(CS), [93].
regex_lit(R) --> [40], regex_union(R), [41].
class_body([C|T]) --> class_lit(C),class_body(T).
class_body(CS) -->
class_lit(C0), [45], class_lit(C1), class_body(T),
% {findall(C, between(C0, C1, C), H), append(H,T,CS)}.
{H = findall(C, between(C0, C1, C)), append(H,T,CS)}. % hakank
class_body([]) --> [].
class_lit(C) --> [C], {\+ class_ctrl(C)}.
class_lit(C) --> [92], [C].
class_ctrl(C) :- CS=to_codes("\\[]-"), member(C, CS). % hakank
regex_ctrl(C) :- CS=to_codes("\\.[]|+?*()"), member(C, CS). % hakank
% Regex Engine
%%%%%%%%%%%%%%
% The regex empty matches any string without consuming any characters.
match(S, regex_empty, S).
% A regex consisting of a single character matches any string starting with
% that character. The chanter is consumed.
match([C|S], regex_char(CS), S) :- member(C, CS).
% A union of two regex only needs to satisify one of the branches.
match(S, regex_union(L,R), T) :- match(S, L, T); match(S, R, T).
% A concat of two regex must satisfy the left and then the right.
match(S, regex_concat(L, R), U) :- match(S, L, T), match(T, R, U).
% The kleene closure of a regex can match the regex 0 times or it can the regex
% once before matching the kleene closure again.
match(S, regex_kleene(_), S).
match(S, regex_kleene(K), U) :- match(S, K, T), S != T, match(T, $regex_kleene(K), U).
% See wordle_dcg.pi for comparison (using DCG)
worldle_regexp(Wordle) :-
% This (prefix) regex was generated by make_regex.pi (go3/0).
Wordle = "(a(b(a(ck|se|te)|b(ey|ot)|hor|ide|led|o(de|rt|ut|ve)|use|yss)|c(orn|rid|tor|ute)|d(a(ge|pt)|ept|mi[nt]|o(be|pt|r[en])|ult)|f(fix|ire|o(ot|ul)|ter)|g(a(in|pe|te)|ent|i(le|ng)|low|o(ny|ra)|ree)|head|i(der|sle)|l(arm|bum|ert|gae|i(bi|en|gn|ke|ve)|l(ay|ey|o[twy])|o(ft|n[eg]|of|ud)|pha|t(ar|er))|m(a(ss|ze)|b(er|le)|end|i(ss|ty)|ong|pl[ey]|use)|n(g(e[lr]|le|ry|st)|ime|kle|n(ex|oy|ul)|ode|tic|vil)|orta|p(art|hid|ing|nea|pl[ey]|ron|tly)|r(bor|dor|ena|gue|ise|mor|o(ma|se)|r(ay|ow)|son|tsy)|s(cot|hen|ide|kew|s(ay|et))|t(o(ll|ne)|tic)|u(di[ot]|gur|nty)|v(ail|ert|ian|oid)|w(a(it|ke|r[de]|sh)|ful|oke)|xi(al|o[mn])|zure)|b(a(con|d(ge|ly)|g(el|gy)|ker|l(er|my)|n(al|jo)|r(ge|on)|s(al|i[clns]|te)|t(ch|he|on|ty)|wdy|you)|e(a(ch|dy|rd|st)|e(ch|fy)|fit|g(a[nt]|et|in|un)|ing|l(ch|ie|l[ey]|ow)|nch|r(et|ry|th)|set|tel|vel|zel)|i(ble|cep|ddy|got|l(ge|ly)|ng[eo]|ome|r(ch|th)|son|tty)|l(a(ck|de|me|n[dk]|re|st|ze)|e(a[kt]|e[dp]|nd|ss)|i(mp|n[dk]|ss|tz)|o(at|ck|ke|nd|o[dm]|wn)|u(er|ff|nt|r[bt]|sh))|o(a(rd|st)|bby|n(ey|go|us)|o(by|st|t[hy]|z[ey])|r(ax|ne)|s(om|sy)|tch|u(gh|le|nd)|wel|xer)|r(a(ce|i[dn]|ke|nd|s[hs]|v[eo]|w[ln])|e(a[dk]|ed)|i(ar|be|ck|de|ef|n[egky]|sk)|o(ad|il|ke|o[dkm]|th|wn)|u(nt|sh|te))|u(d(dy|ge)|g(gy|le)|il[dt]|l(ge|ky|ly)|n(ch|ny)|r(ly|nt|st)|s(ed|hy)|t(ch|te)|xom|yer)|ylaw)|c(a(b(al|by|in|le)|c(ao|he|ti)|d(dy|et)|gey|irn|me[lo]|n(al|dy|ny|o[en])|p(er|ut)|r(at|go|ol|ry|ve)|ste|t(ch|er|ty)|u(lk|se)|vil)|e(ase|dar|llo)|h(a(f[ef]|i[nr]|lk|mp|nt|os|r[dmt]|s[em])|e(a[pt]|ck|e[kr]|s[st])|i(ck|de|ef|l[dil]|me|na|rp)|o(ck|ir|ke|r[de]|se)|u(ck|mp|nk|rn|te))|i(der|gar|nch|rca|vi[cl])|l(a(ck|im|mp|n[gk]|s[hps])|e(a[nrt]|ft|rk)|i(ck|ff|mb|n[gk])|o(ak|ck|ne|se|th|u[dt]|ve|wn)|u(ck|ed|mp|ng))|o(a(ch|st)|bra|coa|lo[nr]|m(et|fy|ic|ma)|n(ch|do|ic)|pse|r(al|er|ny)|u(ch|gh|ld|nt|pe|rt)|ve[nrty]|wer|yly)|r(a(ck|ft|mp|n[ek]|s[hs]|te|ve|wl|z[ey])|e(a[km]|do|e[dkp]|me|p[et]|s[st])|i(ck|e[dr]|m[ep]|sp)|o(ak|ck|n[ey]|ok|ss|up|w[dn])|u(de|el|m[bp]|s[ht])|ypt)|u(bic|min|r(io|ly|ry|se|v[ey])|tie)|y(ber|cle|nic))|d(a(ddy|i(ly|ry|sy)|lly|n(ce|dy)|tum|unt)|e(a(lt|th)|b(ar|it|u[gt])|c(a[ly]|o[ry]|ry)|fer|i(gn|ty)|l(ay|ta|ve)|m(on|ur)|n(im|se)|p(ot|th)|rby|t(er|ox)|uce|vil)|i(ary|cey|git|lly|mly|n(er|g[oy])|ode|r(ge|ty)|sco|t(ch|t[oy])|ver|zzy)|o(dg[ey]|gma|ing|lly|n(or|ut)|pey|u(bt|gh)|w(dy|el|ny|ry)|zen)|r(a(ft|in|ke|ma|nk|pe|w[ln])|e(a[dm]|ss)|i(e[dr]|ft|ll|nk|ve)|o(it|ll|ne|o[lp]|ss|ve|wn)|u(id|nk)|y(er|ly))|u(chy|lly|m(my|py)|nce|s(ky|ty)|tch|vet)|w(arf|el[lt])|ying)|e(a(g(er|le)|r(ly|th)|sel|te[nr])|bony|clat|di(ct|fy)|erie|gret|ight|ject|king|l(ate|bow|der|e(ct|gy)|fin|i(de|te)|ope|ude)|m(ail|be[dr]|cee|pty)|n(act|dow|em[ay]|joy|nui|sue|t(er|ry)|voy)|po(ch|xy)|qu(al|ip)|r(ase|ect|ode|ror|upt)|s(say|ter)|t(h(er|ic|os)|ude)|v(ade|e(nt|ry)|ict|oke)|x(a(ct|lt)|cel|ert|i(le|st)|pel|t(ol|ra)|ult)|ying)|f(a(ble|cet|i(nt|ry|th)|lse|n(cy|ny)|rce|t(al|ty)|u(lt|na)|vor)|e(ast|cal|ign|l(la|on)|m(me|ur)|nce|r(al|ry)|t(al|ch|id|us)|ver|wer)|i(b(er|re)|cus|e(ld|nd|ry)|ft[hy]|ght|l(e[rt]|ly|my|th)|n(al|ch|er)|rst|shy|xer|zzy)|jord|l(a(ck|i[lr]|k[ey]|me|nk|re|s[hk])|e(ck|et|sh)|i(ck|er|n[gt]|rt)|o(at|ck|o[dr]|ra|ss|u[rt]|wn)|u(ff|id|ke|me|n[gk]|sh|te)|yer)|o(amy|c(al|us)|ggy|ist|l(io|ly)|r(ay|ce|g[eo]|t[ehy]|um)|und|yer)|r(a(il|me|nk|ud)|e(ak|e[dr]|sh)|i(ar|ed|ll|sk|tz)|o(ck|n[dt]|st|th|wn|ze)|uit)|u(dge|gue|lly|n(gi|ky|ny)|r(or|ry)|ssy|zzy))|g(a(ffe|ily|m(er|ma|ut)|ssy|u(dy|ge|nt|ze)|vel|wky|y(er|ly)|zer)|e(cko|e(ky|se)|n(ie|re))|ho(st|ul)|i(ant|ddy|psy|r(ly|th)|ve[nr])|l(a(de|nd|re|ss|ze)|ea[mn]|i(de|nt)|o(at|be|om|ry|ss|ve)|yph)|n(ash|ome)|o(dly|ing|l(em|ly)|n(ad|er)|o(dy|ey|fy|se)|rge|u(ge|rd))|r(a(ce|de|ft|i[ln]|n[dt]|p[eh]|s[ps]|te|v[ey]|ze)|e(at|e[dnt])|i(ef|ll|m[ey]|nd|pe)|o(an|in|om|pe|ss|u[pt]|ve|w[ln])|u(el|ff|nt))|u(a(rd|va)|es[st]|i(de|l[det]|se)|l(ch|ly)|m(bo|my)|ppy|st[oy])|ypsy)|h(a(bit|iry|lve|ndy|ppy|r(dy|em|py|ry|sh)|st[ey]|t(ch|er)|u(nt|te)|v(en|oc)|zel)|e(a(dy|r[dt]|th|v[ey])|dge|fty|ist|l(ix|lo)|nce|ron)|i(lly|nge|pp[oy]|tch)|o(ard|bby|ist|lly|mer|n(ey|or)|r(de|ny|se)|t(el|ly)|u(nd|se)|ve[lr]|wdy)|u(m(an|id|or|ph|us)|n(ch|ky)|rry|s(ky|sy)|tch)|y(dro|ena|men|per))|i(ci(ly|ng)|d(eal|io[mt]|ler|yll)|gloo|liac|m(age|bue|p(el|ly))|n(ane|box|cur|dex|e(pt|rt)|fer|got|l(ay|et)|ner|put|t(er|ro))|onic|r(ate|ony)|s(let|sue)|tchy|vory)|j(a(unt|zzy)|e(lly|rky|tty|wel)|iffy|o(i(nt|st)|ker|lly|ust)|u(dge|ic[ey]|m(bo|py)|nt[ao]|ror))|k(a(ppa|rma|yak)|ebab|haki|i(nky|osk|tty)|n(a(ck|ve)|e(ad|e[dl]|lt)|ife|o(ck|ll|wn))|oala|rill)|l(a(b(el|or)|d(en|le)|ger|n(ce|ky)|p(el|se)|r(ge|va)|sso|t(ch|er|he|te)|ugh|yer)|e(a(ch|fy|ky|nt|pt|rn|s[eht]|ve)|dge|e(ch|ry)|fty|g(al|gy)|m(on|ur)|per|ve[lr])|i(bel|ege|ght|ken|lac|m(bo|it)|n(e[nr]|go)|pid|the|v(er|id))|lama|o(a(my|th)|bby|c(al|us)|dge|fty|gi[cn]|o(py|se)|rry|ser|us[ey]|ver|w(er|ly)|yal)|u(c(id|ky)|m(en|py)|n(ar|ch|ge)|pus|r(ch|id)|sty)|y(ing|mph|nch|ric))|m(a(c(aw|ho|ro)|d(am|ly)|fia|g(ic|ma)|ize|jor|ker|m(bo|m[ay])|n(g[aeoy]|i[ac]|ly|or)|ple|r(ch|ry|sh)|s(on|se)|t(ch|ey)|uve|xim|y(be|or))|e(a(ly|nt|ty)|cca|d(al|i[ac])|l(ee|on)|r(cy|ge|it|ry)|t(al|er|ro))|i(cro|d(ge|st)|ght|lky|mic|n(ce|er|im|or|ty|us)|rth|s(er|sy))|o(cha|d(al|e[lm])|gul|ist|l(ar|dy)|n(ey|th)|o(dy|se)|r(al|on|ph)|ssy|t(el|if|or|to)|u(lt|n[dt]|rn|se|th)|v(er|ie)|wer)|u(c(ky|us)|ddy|lch|mmy|nch|r(al|ky)|s(hy|ic|ky|ty))|yrrh)|n(a(dir|ive|nny|s(al|ty)|tal|v(al|el))|e(edy|igh|r(dy|ve)|ver|w(er|ly))|i(c(er|he)|ece|ght|n(ja|ny|th))|o(bl[ey]|is[ey]|mad|ose|rth|sey|tch|vel)|u(dge|rse|tty)|y(lon|mph))|o(aken|bese|c(cur|ean|t(al|et))|dd(er|ly)|f(f(al|er)|ten)|l(de[nr]|ive)|m(bre|ega)|n(ion|set)|p(era|i(ne|um)|tic)|r(bit|der|gan)|t(her|ter)|u(ght|nce|t(do|er|go))|v(a(ry|te)|ert|ine|oid)|w(ing|ner)|xide|zone)|p(a(ddy|gan|int|l(er|sy)|n(el|ic|sy)|p(al|er)|r(er|ka|ry|se|ty)|st[aey]|t(ch|io|sy|ty)|use|ye[er])|e(a(c[eh]|rl)|can|dal|n(al|ce|n[ey])|r(ch|il|ky)|s(ky|to)|t(al|ty))|h(ase|o(n[ey]|to))|i(ano|cky|e(ce|ty)|ggy|lot|n(ch|ey|ky|to)|per|que|t(ch|hy)|vot|x(el|ie)|zza)|l(a(ce|i[dnt]|n[ekt]|te|za)|ea[dt]|ie[dr]|u(ck|m[bep]|nk|sh))|o(esy|i(nt|se)|ker|l(ar|ka|yp)|och|ppy|rch|s(er|it|se)|u(ch|nd|ty)|wer)|r(a(nk|wn)|e(en|ss)|i(c[ek]|de|ed|m[eo]|nt|or|sm|vy|ze)|o(be|n[eg]|of|se|ud|ve|wl|xy)|u(de|ne))|salm|u(bic|dgy|ffy|l(py|se)|nch|p(al|il|py)|r(e[er]|ge|se)|shy|tty)|ygmy)|qu(a(ck|il|ke|lm|r[kt]|s[hi])|e(e[nr]|ll|ry|st|ue)|i(ck|et|l[lt]|rk|te)|ot[aeh])|r(a(b(bi|id)|cer|d(ar|i[io])|i(ny|se)|jah|l(ly|ph)|men|n(ch|dy|ge)|pid|rer|spy|t(io|ty)|ven|yon|zor)|e(a(c[ht]|dy|lm|rm)|b(ar|el|u[st])|c(ap|u[rt])|edy|f(er|it)|gal|hab|ign|l(a[xy]|ic)|mit|n(al|ew)|p(ay|el|ly)|run|s(et|in)|t(ch|r[oy])|use|v(el|ue))|h(ino|yme)|i(d(er|ge)|fle|g(ht|id|or)|nse|pe[nr]|s(e[nr]|ky)|v(al|e[rt]))|o(a(ch|st)|b(in|ot)|cky|deo|g(er|ue)|o(my|st)|tor|u(g[eh]|nd|se|te)|ver|w(dy|er)|yal)|u(d(dy|er)|gby|ler|m(ba|or)|pee|ral|sty))|s(a(dly|fer|int|l(ad|ly|on|sa|ty|v[eo])|n(dy|er)|ppy|ssy|t(in|yr)|u(c[ey]|na|te)|v(o[ry]|vy))|c(a(l[depy]|mp|nt|r[efy])|en[et]|ion|o(ff|ld|ne|op|pe|r[en]|u[rt]|wl)|r(a[mp]|e[ew]|u[bm])|uba)|e(dan|edy|gue|ize|men|nse|pia|r(if|um|ve)|tup|ve[nr]|wer)|h(a(ck|d[ey]|ft|k[ey]|l[elt]|me|nk|pe|r[dekp]|ve|wl)|e(ar|e[nprt]|ik|l[fl])|i(ed|ft|n[ey]|r[ekt])|o(al|ck|ne|o[kt]|r[ent]|ut|ve|w[ny])|r(ew|u[bg])|u(ck|nt|sh)|yly)|i(e(ge|ve)|g(ht|ma)|l(ky|ly)|n(ce|ew|ge)|ren|ssy|xt[hy])|k(ate|i(er|ff|ll|mp|rt)|u(l[kl]|nk))|l(a(ck|in|n[gt]|sh|te|ve)|e(e[kpt]|pt)|i(c[ek]|de|m[ey]|n[gk])|o(op|pe|sh|th)|u(mp|n[gk]|rp|sh)|yly)|m(a(ck|ll|rt|sh)|e(ar|l[lt])|i(le|rk|t[eh])|o(ck|k[ey]|te))|n(a(ck|il|k[ey]|r[el])|e(ak|er)|i(de|ff|pe)|o(op|r[et]|ut|wy)|u(ck|ff))|o(apy|ber|ggy|l(ar|id|ve)|n(ar|ic)|ot[hy]|rry|u(nd|th)|wer)|p(a(ce|de|nk|r[ek]|sm|wn)|e(a[kr]|ck|ed|l[lt]|n[dt]|rm)|i(c[ey]|e[dl]|k[ey]|l[lt]|n[ey]|re|te)|l(at|it)|o(il|ke|o[fkln]|r[et]|ut)|r(ay|ee|ig)|u(nk|r[nt]))|qu(a[dt]|ib)|t(a(ck|ff|ge|i[dnr]|ke|l[ekl]|mp|n[dk]|r[ekt]|sh|te|ve)|e(a[dklm]|e[dlpr]|in|rn)|i(ck|ff|l[lt]|n[gkt])|o(ck|ic|ke|le|mp|n[ey]|o[dlp]|r[ekmy]|ut|ve)|r(a[pwy]|ip|ut)|u(ck|dy|ff|mp|n[gkt])|yle)|u(ave|gar|i(ng|te)|l(ky|ly)|mac|nny|per|r(er|ge|ly)|shi)|w(a(m[ip]|rm|sh|th)|e(a[rt]|e[pt]|ll|pt)|i(ft|ll|n[eg]|rl|sh)|o(o[np]|r[den])|ung)|y(nod|rup))|t(a(b(by|le|oo)|c(it|ky)|ffy|int|ke[nr]|l(ly|on)|mer|ng[oy]|p(er|ir)|r(dy|ot)|st[ey]|tty|unt|wny)|e(a(ch|ry|se)|ddy|eth|mpo|n(et|or|se|th)|p(ee|id)|r(ra|se)|sty)|h(ank|e(ft|ir|me|re|se|ta)|i(ck|ef|gh|n[gk]|rd)|o(ng|rn|se)|r(e[ew]|o[bw]|um)|um[bp]|yme)|i(ara|bia|dal|g(er|ht)|lde|m(er|id)|psy|t(an|he|le))|o(ast|d(ay|dy)|ken|n(al|ga|ic)|oth|p(az|ic)|r(ch|so|us)|t(al|em)|u(ch|gh)|we[lr]|xi[cn])|r(a(c[ekt]|de|i[lnt]|mp|sh|wl)|e(a[dt]|nd)|i(a[dl]|be|c[ek]|ed|pe|te)|o(ll|op|pe|ut|ve)|u(c[ek]|er|ly|mp|nk|s[st]|th)|yst)|u(b(al|er)|l(ip|le)|mor|nic|rbo|tor)|w(ang|e(ak|e[dt])|i(ce|ne|rl|st|xt))|ying)|u(dder|l(cer|tra)|mbra|n(c(le|ut)|d(er|id|ue)|f(ed|it)|i(fy|on|t[ey])|lit|met|set|ti[el]|wed|zip)|p(per|set)|r(ban|ine)|s(age|her|ing|u(al|rp))|t(ile|ter))|v(a(gue|l(et|id|or|ue|ve)|p(id|or)|u(lt|nt))|e(gan|n(om|ue)|r(ge|s[eo]|ve))|i(car|deo|g(il|or)|lla|nyl|ola|per|r(al|us)|s(it|or|ta)|tal|vid|xen)|o(cal|dka|gue|i(ce|la)|mit|ter|uch|wel)|ying)|w(a(cky|fer|g(er|on)|i(st|ve)|ltz|rty|ste|t(ch|er)|ver|xen)|e(a(ry|ve)|dge|edy|i(gh|rd)|l(ch|sh)|nch)|h(a(ck|le|rf)|e(at|el|lp|re)|i(ch|ff|le|n[ey]|rl|sk|te)|o(le|op|se))|i(d(e[nr]|ow|th)|eld|ght|lly|mpy|n(c[eh]|dy)|s(er|py)|t(ch|ty))|o(ken|m(an|en)|o(dy|er|ly|zy)|r(dy|ld|ry|s[et]|th)|u(ld|nd)|ven)|r(a(ck|th)|e(ak|ck|st)|i(ng|st|te)|o(ng|te)|ung|yly))|y(acht|ea(rn|st)|ield|ou(ng|th))|z(e(bra|sty)|onal))".