Replace Solution arrow in list of list
If one must stick to ReplaceAll
, I agree with the solution by @LouisB in the comment. But there are other solutions, too.
One can use Cases
, which I would prefer:
Cases[#, _?NumericQ, -1] & /@ sol
Or Values
with MapAt
also qualifies:
Flatten /@ MapAt[Values, sol, {All, 2}]
In contrast to all solutions presented so far, I highly recommend you make use of a replacement in order to ensure the order of the extracted numbers:
Flatten@{#[[1]], {x, y} /. #[[2, 1]]} & /@ sol
(* {{5, 7, 3}, {7, 11, 5}, {11, 211, 137}, {13, 11, 3}} *)
In this way, you can be sure you always get x
before y
, even if the list of rules has a different order.