h2non / jsonpath-ng

Finally, a JSONPath implementation for Python that aims to be standard compliant. That's all. Enjoy!
Apache License 2.0
603 stars 87 forks source link

Improve Split regex #175

Closed smartycope closed 2 months ago

smartycope commented 3 months ago

Added negative and * indecies and quotes to Split parameters

michaelmior commented 2 months ago

Could you clarify what the purpose is of the changes to the split regex?

smartycope commented 2 months ago

It does a few things:

michaelmior commented 2 months ago

@smartycope Thanks! I think it would help to have pieces of the regex documented in the code since it's non-trivial to understand.

I'm also curious why you used (?:\s+)? instead of (?:\s*). Is there some subtle difference I'm missing?

smartycope commented 2 months ago

@michaelmior I added the documentation you asked for, good thinking.

As for (?:\s+)? vs (?:\s*), I don't know of a difference, that's simply how it was generated.

michaelmior commented 2 months ago

LGTM, thanks!