The following pattern matches only the first element
{a, b, c, d, e} /. {start : ___, x_, stop : ___} :> {start, 1, stop}
How do I make it match all of the list elements?
UPDATE:
The slightly more extended version of my goal is to have a set of three transformation rules for different elements of the list. One rule should apply to the first element, one for the last element, and another rule for every element in the middle. Here's an example:
{a, b, c, d, e} /. {most : Repeated[_], x_} ->
{most, "Last"} /. {x_, rest : Repeated[_]} -> {"First", rest}
These are the rules for the first and the last element. Now I need the rule for all the elements in the middle. Hence my original question.
I've probably chosen a wrong approach, because I cannot find a straightforward way to do this. Is it possible to do this with rules?