Skip to content

Commit 767b1d9

Browse files
committed
show the limitation of {@regexp}
1 parent 1cd847a commit 767b1d9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ Major:
6868
- `{.}`, remove the last file extension. (Same in GNU parallel)
6969
- `{:}`, remove all file extensions (***Not directly supported in GNU parallel***)
7070
- `{^suffix}`, remove `suffix` (***Not directly supported in GNU parallel***)
71-
- `{@regexp}`, capture submatch using regular expression (***Not directly supported in GNU parallel***)
71+
- `{@regexp}`, capture submatch using regular expression (***Not directly supported in GNU parallel***).
72+
There's a limitation here: curly brackets can't be used in the regular expression.
7273
- Combinations
7374
- `{%.}`, `{%:}`, basename without extension
7475
- `{2.}`, `{2/}`, `{2%.}`, manipulate `n`th field
@@ -207,6 +208,7 @@ Replacement strings in commands:
207208
{:} remove all file extensions.
208209
{^suffix} remove suffix
209210
{@regexp} capture submatch using regular expression
211+
Limitation: curly brackets can't be used in the regexp.
210212
211213
Escaping curly brackets "{}":
212214
{{}} {}

root.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ Replacement strings in commands:
7878
{.} remove the last file extension
7979
{:} remove all file extensions.
8080
{^suffix} remove suffix
81-
{@regexp} capture submatch using regular expression
81+
{@regexp} capture submatch using regular expression.
82+
Limitation: curly brackets can't be used in the regexp.
8283
8384
Escaping curly brackets "{}":
8485
{{}} {}

0 commit comments

Comments
 (0)