This may or may not be possible but thought I would ask.
We had recently changed some of the query parameters and wanted to 301 redirect the old version to the new version.
The old parameter scheme was categoryX=Y where X was some number and Y was some number (an example being category56=112). The new version just drops off the X so we have category=112. Now, this seems fairly simple enough to do if there is either a known number of parameters or a single parameter. However, there can be a variable number of these parameters. For example:
http://www.example.com/some_directory/index.shtml?category56=112
http://www.example.com/some_other_directory/index.shtml?category8=52&category11=2&other_param=12
I'm guessing there isn't a way to basically "for each" through the parameters and if a regex matches category(0-9+)=(0-9+) to change it to category=(0-9+)?