Ok, so I dug into this a bit... I had to review how the text information is parsed by the Quick Add tab (split up into the parts).
1. Brian: Both you and I missed that the expected data format is not actually CSV--it needs to be strictly spaces between the name, email, and phone #. In fact, a true CSV file may not parse correctly. It has always been that way. (I never changed the parser that much.) Note that it does indicate in the Quick Add tab what the expected format is. I could add support for true CSV, but that will take some investigation.
2. makehits: The reason you were having issues is that five of the lines have 2 phone numbers in them and that is not supported. For example: look at the lines for Nigel and Sophie. Those have 2 phone numbers in them... not supported. The code will treat the one of the two phone numbers as an email address that looks invalid.
The way the parsing works is that it splits up each line by where the spaces occur. (*not* commas) It then essentially works backwards from the end. The email address and the phone number, if it exists, are presumed not to have spaces in them. Thus, the code just examines the last two non-space pieces of text, and looks at whether one has an @ sign in it to find the email address. If the other of the two has at least 3 digits in a row in it, it is presumed to be a phone number. The email address and phone number (if exists) are stripped off of the original line of text, and whatever is left is presumed to be the name. Since the name is whatever is the "leftovers", it can have spaces, commas, etc. and it will not matter. As long as the code can correctly find the email address and any phone number in each line, the Quick Add will work.
Last edit: 6 years 7 months ago by SteveTheTechie.
The following user(s) said Thank You: makehits
The topic has been locked.