dfr replace
for dataframe
Replace the leftmost (sub)string by a regex pattern.
Signature
> dfr replace --pattern --replace
Parameters
--pattern {string}
: Regex pattern to be matched--replace {string}
: replacing string
Examples
Replaces string
> [abc abc abc] | dfr into-df | dfr replace -p ab -r AB
╭───┬─────╮
│ # │ 0 │
├───┼─────┤
│ 0 │ ABc │
│ 1 │ ABc │
│ 2 │ ABc │
╰───┴─────╯