How can I validate to Python re flavor regex?
Closed this issue · 4 comments
msarauer commented
Is there a way to validate the regex to Python re flavor regex rather than Golang regex?
I saw these changes, but I don't understand how I would make it validate to Python. bbc9f89
msarauer commented
I guess I need to do something like
c.Formats["regex"] = func(
then provide a custom validator? How can I validate Python Regex in Go code?
santhosh-tekuri commented
You have to use some golang library which provides python flavoured regex. I am not sure of any such library.
with the commit you mentioned, such library can be used in both c.Formats["regex"]
and Compiler.CompileRegex
msarauer commented
If I make a change to c.Formats["regex"]
, I assume that I don't need to change Compiler.CompileRegex
as well? @santhosh-tekuri
santhosh-tekuri commented
You need to add both