/;)Condition[pattern, expr]pattern /; exprTrue.The controlling expression of a Condition can use variables from the pattern:
f[3] /. f[x_] /; x>0 -> t
f[-3] /. f[x_] /; x>0 -> t
Condition can be used in an assignment:
f[x_] := p[x] /; x>0
f[3]
f[-3]