-
I want to stringify an ASCII & Unicode mixed string, do some operations and then Un-stringify it, here is the filter I used:
I expact an output like Now I'm wondering how to turn |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I solved it by creating 2 customized String Filter operators. Is there any non-intrusive way to achieve this?
Then I use them to escape and unescape:
|
Beta Was this translation helpful? Give feedback.
-
Hi @pimgeek TW currently doesn't have the reverse operators to stringify or jsonstringify, and I think it would be reasonable to add them. I'll convert this to an issue, might you like to create a PR for the change? |
Beta Was this translation helpful? Give feedback.
I solved it by creating 2 customized String Filter operators. Is there any non-intrusive way to achieve this?
Then I use them to escape and unescape:
\define ascii-regex() ([\u0000-\u007f])
{{{ 'abc一二三' +[search-replace:g:regexp<ascii-regex>,[$1..]js-escape[]split[]first[15]join[]search-replace:g:regexp[\.\.],[]js-un…