# Extract all elements of an expression in order into a list [closed]

I have and expression a + b + c - d and I would like to generate a list of {a, +, b, +, c, -, d}. I have tried Head, FullForm which is close but not quite what I am looking for. I have also tried Part and Extract with no luck.

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Commented Aug 11, 2015 at 12:39
• It's not clear exactly what output you want. This is close: First@ToBoxes[a + b + c - d, StandardForm], but all parts are strings. Is that what you want? Commented Aug 11, 2015 at 12:41
• I don't fully understand your question. + is not part of that expression. What FullForm shows you corresponds directly to how the expression is stored internally. It might help if you explained your motivation behind trying to do this. Commented Aug 11, 2015 at 12:45
• If you don't want strings then a + b + c - d /. Plus -> List gives {a, b, c, -d} Commented Aug 11, 2015 at 13:11
• It might help if you explain why you want to do this as well. Commented Aug 11, 2015 at 13:21

I'm certain that this will not be the solution to whatever real problem there is behind your question, but incidentally, you could use this function from a former answer

fultzTokenize[t_String] :=
Cases[MathLinkCallFrontEnd[
FrontEndUndocumentedTestFEParserPacket[t, False]], _String,
Infinity]

fultzTokenize["a+b+c-c"]


it gives you

but be aware that output and input are strings.

• I can not resist and give you a fultzPoint, +1.
– user9660
Commented Aug 11, 2015 at 17:31