- Jul
- 576
- 10
I’m trying to highlight a quoted section of text that is being echo’ed the screen (command parameters actually).
So I want to use regex to insert color-change ansi before the first quote (to make it orange), and after the last quote (to make it yellow).
which requires me doing a @ReRegex with pattern matching on the quotes.
I want to substitute the first quote with orange+quote.
I want to substitute the last quote with qutoe+yellow.
I can do this in Perl just fine, but %@ReRegex doesn’t seem to work with \q for quote!
[Remember, I had a whole support issue in the past about regexes and quotes, and the answer was basically, "use \q for quotes in regex!". So I am following that advice and finding out that I can’t actually use \q for quotes in ReReplace]
I don’t THINK i’m doing this wrong?
So I want to use regex to insert color-change ansi before the first quote (to make it orange), and after the last quote (to make it yellow).
which requires me doing a @ReRegex with pattern matching on the quotes.
I want to substitute the first quote with orange+quote.
I want to substitute the last quote with qutoe+yellow.
I can do this in Perl just fine, but %@ReRegex doesn’t seem to work with \q for quote!
[Remember, I had a whole support issue in the past about regexes and quotes, and the answer was basically, "use \q for quotes in regex!". So I am following that advice and finding out that I can’t actually use \q for quotes in ReReplace]
Code:
echo %@REReplace[\q,{QUOTE},"How is "your" quest going?"]
I don’t THINK i’m doing this wrong?