Hello
Below is a line which works as expected:
Cases[\!\(\*
TagBox[
StyleBox[
RowBox[{"Times", "[",
RowBox[{
RowBox[{"Power", "[",
RowBox[{"_", ",", "n_"}], "]"}], ",", "x_"}], "]"}],
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) /; EvenQ[n]] @@ {1 + y x^2 + y x^3 }
I expect the line below to have an identical result (only change: use of the n?EvenQ construct instead of EvenQ[n]).
Cases[{ 1 + y x^2 + y x^3}, \!\(\*
TagBox[
StyleBox[
RowBox[{"Times", "[",
RowBox[{
RowBox[{"Power", "[",
RowBox[{"_", ",", "n_"}], "]"}], ",", "x_"}], "]"}],
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\) /; n?EvenQ, Infinity]
It is accepted by MMA but since it returns nothing, It must be interpreted differently. But how?
True I always saw in examples that the construct form ' _?test' is being used but I never read that the _
cannot be replaced here by a pattern variable