sed_replace | R Documentation |
Search and replace a regex pattern across several files. This only works on POSIX compatible systems where sed is available. It is recommended to use this feature only on files checked into a version control system like git.
sed_replace(
pattern,
replace,
dir = ".",
case_sensitive = TRUE,
path_pattern = getOption("sifr.path_pattern"),
path_case_sensitive = FALSE,
recursive = TRUE
)
pattern |
|
replace |
|
dir |
|
case_sensitive |
|
path_pattern |
|
path_case_sensitive |
|
recursive |
|
A sif_result
data.table
that contains all matched lines (before replacement took place)
sed has its own flavor of regular expression that does not support all features. The exact features supported are platform dependent (e.g. case insensitive matching is not supported on macOS).
Replaces text that matches pattern
across all
files that match path_pattern
with replace
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.