06-03-2024 01:26 PM
I have hard time placing the text below in a 2D array. Can someone please help? Please do not modify text, also do not mind the data. I made it up.
Front panel:
This below 👇 is what I want to out of the given string, but how do I achieve this?
Solved! Go to Solution.
06-03-2024 03:48 PM
One way is to look for the field delimiters on the original string.
Use function Match pattern to look for delimitators for example Data, The Title, and once you find them, look for the end of the string (\r\n for example)
then transform the reaming string into a 2D string and select the desired columns.
Then at the end, build the 2D array from the data fields you found on the previous steps.
06-03-2024 03:51 PM
06-04-2024 09:04 AM
Thank you, Mr. Altenbach! This is exactly what I want to achieve.
06-04-2024 09:25 AM
Make sure to fully understand exactly how it does it, especially if you need to make modifications later.
The real flaw is that the input text is not really well formatted for processing, so maybe you can change code upstream and modify whatever generates that string. You also need to be careful for unusual inputs, for example if the String on the first line contains a delimiter by accident ("=", linefeed, etc.), things will break. Also make sure to use the correct terminology and don't call a 2D string array a "table" (as in your first post) unless you are actually using a table indicator.