Possibility to replace quotation marks or brackets #1915
-
Is it possible to replace brackets or quotation marks? I would like to replace "" with "$|$" or () with ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
From the docs, "There are a number of characters that are special (or reserved) and cannot be used as the first character of an unquoted scalar: Do I take it you'd like to be able to do something like: - trigger: ""
replace: $|$ ? - trigger: ()
replace: (|) is straightforward, so I've probably misunderstood. |
Beta Was this translation helpful? Give feedback.
-
Some people prefer to use quote-marks. I feel they make the code less readable (and would rewrite the docs accordingly!), and they mean that " - trigger: '""'
replace: '"$|$"' and - trigger: ()
replace: ($|$) will do what you need, I think. |
Beta Was this translation helpful? Give feedback.
Some people prefer to use quote-marks. I feel they make the code less readable (and would rewrite the docs accordingly!), and they mean that "
\
"s and other characters need to be escaped, which makes regex testing more difficult.and
will do what you need, I think.