zkemail / zk-regex

A library to do regex verification in circom, adapted from the original zk-email. It additionally generates lookup tables for halo2-regex.
GNU General Public License v3.0
76 stars 27 forks source link

Handle international characters correctly #44

Closed Divide-By-0 closed 7 months ago

Divide-By-0 commented 8 months ago

We can directly capture the multiple bytes like this in the regex definition but not the static regex string

regex definition e.g. (\u00c3|\u00c4|\u00c5)+ translates to a multi_or of 195, 196, 197 in circom which is correct

but we cant do this in the static string e.g. \u00c3\u00c4\u00c5, so we have to manually update the circom code ourselves. would be good to enable this in the script at least