Skip to content
Advertisement

Extract Column(s) from text file having Multi Character Delimiter i.e. “%$%”

I have tried different solution for the problem given on the forum but doesn’t work for the specified Delimiter %$%, I need to extract one specific column from the file containing 200+ columns.

I tried the following:

JavaScript

Advertisement

Answer

The symbol $ is a special character in a regex, so you need to escape it with a , which is also a special character for the string literal, so it needs to be escaped again.

So, finally we have:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement