How to add capturing group value to shed
replacement
#803
-
I am using this filter to hide all tokens of a voice:
Beside from this not being perfect because it eliminates the instrument informations, I could not find a way to add the token value to the replacement via capturing groups. Also see this PR: rism-digital/verovio#3347 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
To not lose instrument information, you can use
I don't think so. Demo:
I do not understand. For the first substitution
Another way for preserving instrument names would be to prefix all interpretations with You can then restore other interpretations that you find you want to preserve as well as instrument names. |
Beta Was this translation helpful? Give feedback.
-
To hide the clef: use |
Beta Was this translation helpful? Give feedback.
-
It's a problem with double quotes in the shell.
|
Beta Was this translation helpful? Give feedback.
-
Yes, that is right: The terminal shell is trying to interpret $ set "DOLLAR ONE" "DOLLAR TWO" "DOLLAR THREE"
$ echo $1
DOLLAR ONE
$ echo $2
DOLLAR TWO
$ echo $3
DOLLAR THREE
$ echo $1 $2 $3
DOLLAR ONE DOLLAR TWO DOLLAR THREE
$ echo $0
-bash
$ echo "$1 $2 $3"
DOLLAR ONE DOLLAR TWO DOLLAR THREE
$ echo '$1 $2 $3'
$1 $2 $3
$ echo \$1
$1
$ echo \$1 $1
$1 DOLLAR ONE VHV filters are not running in a shell, so it does not matter if |
Beta Was this translation helpful? Give feedback.
It's a problem with double quotes in the shell.
-zsh
headed me into the right direction. Running the command with single quotes instead will work correctly: