Re: Part or Partition or Split or Extract or ...... ????
- To: mathgroup at smc.vnet.net
- Subject: [mg85505] Re: Part or Partition or Split or Extract or ...... ????
- From: Mayneord <spidersaint at gmail.com>
- Date: Wed, 13 Feb 2008 04:08:36 -0500 (EST)
- References: <fojrtu$h1k$1@smc.vnet.net> <fomj7h$hhd$1@smc.vnet.net>
Hi, Thanks for your generous help First I tried the way Bill Rowe has suggested A =Import["new3.txt","Lines"]; In[2]:= GetridOFF = A[[1]] Out[2]= (300a,011c) DS [25\55] # 6, 2 \ LeafJawPositions In[3]:= StringReplace[GetridOFF,{RegularExpression@"^.+\ \["->"",RegularExpression@= "\[.+$"->""}] >From In[3]:= Syntax::sntxf: "\"\!\(\(RegularExpression @\)\)\" cannot be followed by \ \"\!\(= \(\(\"\\[.+$\" -> \"\"\)\)\)\".\!\(\"\"\) \ \!\(\*ButtonBox[\"More...\", ButtonStyle->\"RefGuideLinkText\", \ ButtonFrame->None, ButtonData:>\"General::sntxf\"]\)" It shows some error .. which i did not understand !! Can you please tell me what it could be.. In[4]:= StringCases["GetridOFF",RegularExpression["(?<!\\w)\\d+"]] Out[4]= {} This i thought would extract the numbers from the GetridOFF... but it shows empty. :-( I also Tried the way Derek has suggested A =Import["new3.txt","Lines"]; In[1]:= InputForm[A[[1]]] Out[1]//InputForm= "(300a,011c) DS [25\ \55] # 6, 2 LeafJawPositions" the output does not contain each item in quotes instead it showed two back slashes between the two numbers. Does it mean any thing.. Thanks in advance for your time and suggestions May