Is there a way to read a text file and identify the delimiter without the need to specify the delimiter type in the code or by the user?
Example...
The first text file reads:
John Doe;;123 Riverside Drive;;Beverly Hills;;CA;;90210;;etc...
The second text file reads:
John Doe|123 Riverside Drive|Beverly Hills|CA|90210|etc...
the output should find the delimiter type used in each text file
"The delimiter found is ;;"
"The delimiter found is |"
I tried using string.find and searching for different types of patterns but it seemed be code overkill.
Thanks

Reply With Quote