I know I have seen this before but can't seem to locate it today.
I am trying to take an expression that has some rules in it and replace one of that parts that contain a rule using ReplaceAll
For a simple example consider:
testExpression = {"stuff", Axes -> {False, True}}
(* {"stuff", Axes -> {False, True}} *)
and I want to replace the
Axes -> {False, True}
with
Axes -> False
I have tried
testExpression /.
Hold[Axes -> {False, True}] -> Hold[Axes -> False]
(* {"stuff", Axes -> {False, True}} *)
as well as
testExpression /.
Hold[Rule[Axes , {False, True}]] -> Hold[Rule[Axes , False]]
(* {"stuff", Axes -> {False, True}} *)
I promise to add this to my set of notes if someone could kindly enlighten me.