You could also make one rule that is a bit more specific
{p, Subscript[p, 1], Subscript[p, 2]} //.
head_[x___, p, y___] /; head =!= Subscript :> head[x, 0.5, y]
-> {0.5, Subscript[p, 1], Subscript[p, 2]}
This does not work if p is the entire expression. i.e
p/.head_[x___, p, y___] /; head =!= Subscript :> head[x, 0.5, y]
-> p
In that case you will probably have to add another rule. Note also ReplaceRepeated in the above may make things slower than necessary.
Side remark
You could also do something with Block as follows, though this is not replacement but rather evaluation
Block[
{p = 0.5, Subscript},
SetAttributes[Subscript, HoldAllComplete];
{p, Subscript[p, 1], Subscript[p, 2]}
]
-> {0.5, Subscript[p, 1], Subscript[p, 2]}
pexists twice in an expression for the same reason that my answer works. For example, with expression(p + p^2)/Subscript[p, 1]. I suggest amending your answer to use//.but that can be inefficient. – Mr.Wizard May 20 '13 at 12:55Blocksolution! A very nice addition. – Mr.Wizard May 20 '13 at 14:45