I have this custom query that Im working on and I need to be able to query output values as well as actual stored values.

Example:

    $string = "This is #*&^% a test";
    $string = preg_replace('/[^(\x20-\x7F)]*/','', $string);
    $string_clean = $string

So if I echo $string_clean, I'll get this:

    This is a test

Which is fine, but the issue is that the $string_clean value isn't a stored value (just an output), so I dont know how to use its value in a query, being that the query results are based on stored database values.

Im using a multi array capability of the wordpress query ([**here**][1]). Basically, I use two keys in the array with AND as the meta_compare.

Ideally, I would like to be able to query both value (stored and output). Im interested in this as a search functionality for my query.

Can someone help me with this? How do I do it?. Or if someone knows of a better solution please let me know.

Thanks a mil 


  [1]: http://codex.wordpress.org/Function_Reference/WP_Query#Custom_Field_Parameters