I would like to extract each cell data in a CSV file and export them to a txt file in a Regular Expression form.
Example:
A- Here is the CSV file
Devices
CITY-24460
CITY-24643
CITY-24768
CITY-24838
CITY-24903
CITY-25061
CITY-25064
CITY-25065
CITY-30221
CITY-30226
CITY-30254
CITY-30318
B- Here is expected output in txt file:
^(CITY-24460|CITY-24643|CITY-24768|CITY-24838|CITY-24903|CITY-25061|CITY-25064|CITY-25065|CITY-30221|CITY-30226|CITY-30254|CITY-30318)$
This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.
We expect you to make own attempt to solve your problems first.
… and BTW: When you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
Please … when you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
The result is: CITY-24460|CITY-24643|CITY-24768|CITY-24838|CITY-24903|CITY-25061|CITY-25064|CITY-25065|CITY-30221|CITY-30226|CITY-30254|CITY-30318
Now I need to figure out both ends: Beginning ^( and ending )$
I am getting the desirable output, but it gives me error about the csv file path.
I have also added the parentheses (highlighted yellow).
I think I learned one BIG thing today… about split command.
Thank you Olaf