go-peg
go-peg copied to clipboard
Unicode Regular Expression support
https://github.com/yhirose/go-peg/issues/6#issuecomment-466736815
Plus another question, is there a way to define a Unicode string in rules? eg:
https://stackoverflow.com/questions/30482793/golang-regexp-with-non-latin-characters
STRING_LIT = < [\\p{L}\\d_]+>It will be convenient to define query DSL as following:
a = '世界' and b = 1
@cch123, it's possible though, the Unicode regex spec is massive: http://unicode.org/reports/tr18/ https://www.regular-expressions.info/unicode.html
It would be easy to start with the Unicode Categories first such as \p{L}.