CString.Find("@",0) problem
-
Hi, Seems like a really stupid one but I'm trying to read email addresses out of around about 100 txt files that have been exported from a database. My plan was to CString.Find() the @ symbol, because only the email addresses have @ symbols in the file, then CString.Find() the space behind it to get the end of the address, then to work backwards and find the first space in front of the @. My problem is though that if I do bleh.Find("@",0); I always get a return of -1, that there isn't one there. Does anyone know what I've done wrong/need to do to get this fixed? Thanks
-
Hi, Seems like a really stupid one but I'm trying to read email addresses out of around about 100 txt files that have been exported from a database. My plan was to CString.Find() the @ symbol, because only the email addresses have @ symbols in the file, then CString.Find() the space behind it to get the end of the address, then to work backwards and find the first space in front of the @. My problem is though that if I do bleh.Find("@",0); I always get a return of -1, that there isn't one there. Does anyone know what I've done wrong/need to do to get this fixed? Thanks
Have you traced through to make *sure* the address is there ? What does the code look like ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002 -
Hi, Seems like a really stupid one but I'm trying to read email addresses out of around about 100 txt files that have been exported from a database. My plan was to CString.Find() the @ symbol, because only the email addresses have @ symbols in the file, then CString.Find() the space behind it to get the end of the address, then to work backwards and find the first space in front of the @. My problem is though that if I do bleh.Find("@",0); I always get a return of -1, that there isn't one there. Does anyone know what I've done wrong/need to do to get this fixed? Thanks