yes...
Taken from the examples here:
http://iirf.codeplex.com/sourcecontrol/changeset/view/62027?projectName=IIRF#981491
This ruleset iteratively translates a pair of URL path segments to a querystring n=v segment.
# handle case with no query string. This rule fires the first time through,
# and converts the first pair of URL path segments to a n=v query string segment.
RewriteRule ^/(?!index\.php)([^\?\/]+)/([^\?\/]+)/([^\?]+)$ /$3?$1=$2
# handle the case where there is an existing query string, and more than one pair of
# URL path segments remaining. This rule fires potentially multiple times.
RewriteRule ^/(?!index\.php)([^\?\/]+)/([^\?\/]+)/([^\?]+)\?(.+)$ /$3?$4&$1=$2
# Handle the case with a query string, and exactly one pair of URL path segments.
# This fires once (last).
# It fires when there is an even number of segments.
RewriteRule ^/(?!index\.php)([^\?\/]+)/([^\?\/]+)\?([^\?]+)$ /help.cfm?$3&$1=$2 [L]
# Handle the case with no query string, and exactly one pair of URL path segments.
# This fires once (last).
RewriteRule ^/(?!index\.php)([^\?\/]+)/([^\?\/]+)$ /help.cfm?$1=$2 [L]
# Handle the edge case, where there is an odd number of segments, which is invalid
# for these purposes.
#
# This fires once, after all the other pairs have been parsed. In fact the filter
# cannot know that there is an odd number of segments until it does all the matching.
# So at the end we see, we have one left over segment, and we
# redirect to a 404 page.
RewriteRule ^/(?!index\.php)([^\/\?]+)\?([^\?]+)$ /ResourceNotFound.php [L]
# Handle the edge case where there is only one segment. This is also an error
# in this ruleset.
RewriteRule ^/(?!index\.php)([^\/\?]+)$ /FoundOnlyOneSegment.php [L]
This ruleset might not be exactly what you want but it illustrates the approach. It was not developed for mod_rewrite, but for IIRF, which is a rewriter for IIS. But the syntax should be the same for mod_rewrite, so these rules should just work.
I don't know if mod_rewrite has a logging facility, or a command-line test capability, but IIRF does, which makes it easier to see how individual rules work, or the outcome of sets of rules.
IIRF has an iteration limit that defaults to 10. There's a way to raise that limit to 30, which is pretty high, but still not infinite. That means it won't work for "any number of parameters". It can convert up to 15 pairs of params. I don't know if mod_rewrite has a similar limit.