Re: Disable " symbol
- To: mathgroup at smc.vnet.net
- Subject: [mg111576] Re: Disable " symbol
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Fri, 6 Aug 2010 06:55:56 -0400 (EDT)
- References: <i368m3$r5m$1@smc.vnet.net> <i38rc2$cvp$1@smc.vnet.net> <i3bd70$pj9$1@smc.vnet.net>
On 04/08/10 10:51, ibmichuco wrote: > On Aug 3, 5:34 am, Albert Retey<a... at gmx-topmail.de> wrote: >> Am 02.08.2010 13:03, schrieb michuco: >> >>> Hi, >> >>> I am reading files of mixed strings and numbers using >> >>> Data1= Import["file","Table"] >> >>> where I have something like >> >>> A" A" A' >> >>> which should yield "{A",A",A'}", instead, mathematica >>> gives me "{A" A",A'}". Is there anyway that I can >>> disable the double quote " sign so that mathematica >>> doesn't take this as a string? >> >> I think the "TextDelimiters" option is what you are looking for. >> Note that the list structure is still not what you expected: >> >> ImportString["A\" A\" A'", "Table", "TextDelimiters" -> {}] >> >> hth, >> >> albert > > Hi, > > That's it. Thanks > > Michuco > A more general solution is to read the file with something like: ReadList["c:\\mydir\\myfile.dat", String] This gives you a list of strings - one for each line of the file - and you can process them as you like. David Bailey http://www.dbaileyconsultancy.co.uk