Escape Sequences

I’m using a string " \t\n\r\v\f" to denote white space and I would like to use it as a filter to some strings I want to process.

Is there a good way someone could recommend for me to covert them into their correct escape sequence characters using VL?

No c# allowed!

sounds like a case for regular expressions. can you elaborate with a few examples? what would be input strings, and what would be their corresponding output strings?

latest alphas now include full regex support in VL.
so have a look at Replace [Text.RegularExpressions]
but then…maybe you don’t even need a regex at all and can also do with the ordinare replace? depends a bit on your clarified usecase…

Thanks @joreg, it was the Unescape node that I was most in need of but all of these RegEx nodes are going to come in handy, allowing for more powerful string manipulation, with a little more knowledge.

I was going to say they should be both processes and operations, checked and my wishes were already answered, but I’ll leave it here for perspective.

Summary

The only thing I’m wondering is whether they should be processes or operations. As processes they cache the output, which makes them lighter on a program since they’re only called on changes to the inputs, but on the other hand they can’t be used in stateless scenarios, like delegates, and I guess records.

But then as someone types in a pattern it will throw an error on the incomplete expression. In a cache this is momentary, just a flicker on each key stroke (is/could auto-updated string input be an optional setting?), but in an operation, I suppose the error keeps getting raised until the expression is written correctly.

So maybe the RegEx nodes should be available in both flavours, putting the operation versions in the advanced category.

Much appreciated!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.