Closed Skeeve closed 6 months ago
Update: Same applies for \.
vs. [.]
.
I have a pretty good idea what is wrong but will need a few days to fix it.
Perhaps both are missing as cases in this switch? https://github.com/ohler55/ojg/blob/a1754591ad7c7c8af2093e2c1f6273811df24564/jp/parse.go#L458
A new read function will be needed since regexp have different rules regarding allowable escape sequences.
Please try the better-regex-parsing branch.
I'd love to, Peter. But as I'm quite new to GO development, I'm not sure, how to do that.
Do I have to clone the repo? Or can I point my import section to that branch?
Found it. I have to put
replace github.com/ohler55/ojg => github.com/ohler55/ojg better-regex-parsing
at the bottom of go.mod.
It works!
Thanks a lot!
I'll release today.
Released v1.21.4
Thanks a lot!
Hi!
When I use
$..[?(@ =~ /^\$/)]
I get "0x24 ($) is not a valid escaped character" while when I use$..[?(@ =~ /^[$]/)]
it works as expected.Not-working example
Working example on go playground