Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oskaritimperi/csvre
A simple tool for replacing data in CSV columns with regular expressions.
https://github.com/oskaritimperi/csvre
csv regex rust-lang
Last synced: 3 days ago
JSON representation
A simple tool for replacing data in CSV columns with regular expressions.
- Host: GitHub
- URL: https://github.com/oskaritimperi/csvre
- Owner: oskaritimperi
- License: gpl-3.0
- Created: 2019-03-27T20:20:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-03-29T06:26:18.000Z (over 5 years ago)
- Last Synced: 2024-09-17T14:49:07.030Z (16 days ago)
- Topics: csv, regex, rust-lang
- Language: Rust
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# csvre
A simple tool for replacing data in CSV columns with regular
expressions.## USAGE
csvre [options] --column=COLUMN
csvre (-h | --help)
csvre --version## ARGUMENTS
Regular expression used for matching.
For syntax documentation, see
https://docs.rs/regex/1.1.2/regex/#syntaxSome information about unicode handling can be found from
https://docs.rs/regex/1.1.2/regex/#unicode
Replacement string.
You can reference named capture groups in the regex with $name and
${name} syntax. You can also use integers to reference capture
groups with $0 being the whole match, $1 the first group and so on.If a capture group is not valid (name does not exist or index is
invalid), it is replaced with the empty string.To insert a literal $, use $$.
## OPTIONS
-h, --help
Show this message.
--version
Show the version number.
-d DELIM, --delimiter=DELIM
Field delimiter. This is used for both input and output.
[default: ,]-c COLUMN, --column=COLUMN
Which column to operate on.
You can either use the column name or zero based index. If
you specify --no-headers, then you can only use the index
here.-n, --no-headers
The input does not have a header row.
If you use this option, you can do matching against the first
row of input.-b, --bytes
Don't assume utf-8 input, work on raw bytes instead.
See https://docs.rs/regex/1.1.2/regex/bytes/index.html#syntax
for differences to the normal matching rules.