2 fixed typo, added variant code
source | link

I would use something like this:

Clear[f];
f[key_ -> val_] := key -> If[
   StringMatchQ[ToString@key, ___ ~~ "A" | "a" ~~ ___], q@val, val]

then

f /@ {Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9}
(* {Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9} *)

If you have v10, and your data is in an Association, you use AssociationMap, instead:

AssocationMap[fAssociationMap[f, <|Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9|>
(* <|Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9|> *)

An alternative to StringMatchQ, which I usually forget about, is StringFreeQ which simplifies the implementation:

Clear[g];
g[key_ -> val_] := key -> If[StringFreeQ[ToString@key, "A" | "a"], val, q@val]

I would use something like this:

Clear[f];
f[key_ -> val_] := key -> If[
   StringMatchQ[ToString@key, ___ ~~ "A" | "a" ~~ ___], q@val, val]

then

f /@ {Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9}
(* {Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9} *)

If you have v10, and your data is in an Association, you use AssociationMap, instead:

AssocationMap[f, <|Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9|>
(* <|Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9|> *)

I would use something like this:

Clear[f];
f[key_ -> val_] := key -> If[
   StringMatchQ[ToString@key, ___ ~~ "A" | "a" ~~ ___], q@val, val]

then

f /@ {Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9}
(* {Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9} *)

If you have v10, and your data is in an Association, you use AssociationMap, instead:

AssociationMap[f, <|Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9|>
(* <|Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9|> *)

An alternative to StringMatchQ, which I usually forget about, is StringFreeQ which simplifies the implementation:

Clear[g];
g[key_ -> val_] := key -> If[StringFreeQ[ToString@key, "A" | "a"], val, q@val]
1
source | link

I would use something like this:

Clear[f];
f[key_ -> val_] := key -> If[
   StringMatchQ[ToString@key, ___ ~~ "A" | "a" ~~ ___], q@val, val]

then

f /@ {Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9}
(* {Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9} *)

If you have v10, and your data is in an Association, you use AssociationMap, instead:

AssocationMap[f, <|Aa->1/2, Av->2/5, Bx->3/7, Ce->4/9|>
(* <|Aa -> q[1/2], Av -> q[2/5], Bx -> 3/7, Ce -> 4/9|> *)