Re: Replace, test question

*To*: mathgroup at smc.vnet.net*Subject*: [mg120355] Re: Replace, test question*From*: David Skulsky <edskulsky at gmail.com>*Date*: Tue, 19 Jul 2011 07:00:46 -0400 (EDT)*Reply-to*: comp.soft-sys.math.mathematica at googlegroups.com

I think your conditional needs to be a function of x. Try: {58, 61, 15, 66, 10, 2, 24, 81, 45, 84} /. x_ /; PrimeQ[x] -> P David