rew 0.3.0

A text processing CLI tool that rewrites FS paths according to a pattern.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 🆎 Substring filters

| Filter  | Description                                       |
| ------- | ------------------------------------------------- |
| `#A-B`  | Substring from index `A` to `B`.<br>Indices `A`, `B` start from 1 and are both inclusive.<br>Use `-A` for backward indexing. |
| `#A+L`  | Substring from index `A` of length `L`.           |
| `#A-`   | Substring from index `A` to end.                  |
| `#A`    | Character at index `A`.<br>Equivalent to `#A-A`.  |

Examples:

| Input   | Pattern  | Output | | Input   | Pattern   | Output |
| ------- | -------- | ------ |-| ------- | --------- | ------ |
| `abcde` | `{#2-3}` | `bc`   | | `abcde` | `{#-2-3}` | `cd`   |
| `abcde` | `{#2+3}` | `bcd`  | | `abcde` | `{#-2+3}` | `bcd`  |
| `abcde` | `{#2-}`  | `bcde` | | `abcde` | `{#-2-}`  | `abcd` |
| `abcde` | `{#2}`   | `b`    | | `abcde` | `{#-2}`   | `d`    |