2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: dfr replace
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
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
|
|
|
|
```shell
|
|
|
|
> [abc abc abc] | dfr to-df | dfr replace -p ab -r AB
|
|
|
|
```
|