Using version 1.2.0 ```python import jsonpath jp = jsonpath.compile(r"$[?@ =~ /\d/]") assert jp.findall(["", "1", "10"]) == ["1"] # OK assert str(jp) == r"$[?@ =~ /\d/]" # NOK: "\d" --> "d" jp_from_str = jsonpath.compile(str(jp)) assert jp.findall(["", "1", "10"]) == ["1"] # NOK ``` Note that behavior is OK with `r"$[?match(@, '\\d')]"` (but anti-slash needs to be escaped).