diff --git a/jsonpath_ng/ext/string.py b/jsonpath_ng/ext/string.py index 80ed890..efce289 100644 --- a/jsonpath_ng/ext/string.py +++ b/jsonpath_ng/ext/string.py @@ -42,10 +42,7 @@ def __init__(self, method=None): def find(self, datum): datum = DatumInContext.wrap(datum) value = self.regex.sub(self.repl, datum.value) - if value == datum.value: - return [] - else: - return [DatumInContext.wrap(value)] + return [DatumInContext.wrap(value)] def __eq__(self, other): return (isinstance(other, Sub) and self.method == other.method)