diff --git a/pyproject.toml b/pyproject.toml index d93222f..ac96f67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "qsv" -version = "0.4.1" +version = "0.4.2" description = "A tool that provides elastic and rapid filtering for efficient analysis of huge CSV files, such as eventlogs." readme = "README.md" authors = [ diff --git a/src/qsv/operations/chainables/sed.py b/src/qsv/operations/chainables/sed.py index ac74a25..e9bcea7 100644 --- a/src/qsv/operations/chainables/sed.py +++ b/src/qsv/operations/chainables/sed.py @@ -11,5 +11,5 @@ def sed(df: pl.LazyFrame, colname: str, pattern: str, replacement: str, ignoreca LogController.debug(f"sed condition: {pattern} on {colname}") pattern = pattern if type(pattern) is str else str(pattern) return df.with_columns( - pl.col(colname).cast(pl.String).str.replace(f"(?i){pattern}", replacement) if ignorecase else pl.col(colname).cast(pl.String).str.replace(pattern, replacement) + pl.col(colname).cast(pl.String).str.replace_all(f"(?i){pattern}", replacement) if ignorecase else pl.col(colname).cast(pl.String).str.replace_all(pattern, replacement) )