Suppose I have a list:
where 3 'up's of the list are red(I've made it to Cell Expression as follows).
Cell[BoxData[
RowBox[{"{",
RowBox[{StyleBox["up", StripOnInput -> False,
LineColor -> RGBColor[1, 0, 0],
FrontFaceColor -> RGBColor[1, 0, 0],
BackFaceColor -> RGBColor[1, 0, 0],
GraphicsColor -> RGBColor[1, 0, 0],
FontColor -> RGBColor[1, 0, 0]], ",", "right", ",", "up", ",",
StyleBox["up", StripOnInput -> False,
LineColor -> RGBColor[1, 0, 0],
FrontFaceColor -> RGBColor[1, 0, 0],
BackFaceColor -> RGBColor[1, 0, 0],
GraphicsColor -> RGBColor[1, 0, 0],
FontColor -> RGBColor[1, 0, 0]], ",", "down", ",", "down", ",",
StyleBox["up", StripOnInput -> False,
LineColor -> RGBColor[1, 0, 0],
FrontFaceColor -> RGBColor[1, 0, 0],
BackFaceColor -> RGBColor[1, 0, 0],
GraphicsColor -> RGBColor[1, 0, 0],
FontColor -> RGBColor[1, 0, 0]], ",", "right", ",", "down",
",", "left"}], "}"}]], "Output",
CellChangeTimes -> {3.6183594862091923`*^9}]
Then, how can I pick out those elements with style red? Or more, with a specific style?
I tried to use Select[list, Style[#,Red] &]
and Cases[list, Style[#,Red] &]
, but yield nothing.
Thank you!