Get parameters from referrer Is there a way to get the parameters from the referrer url?

I've tried this:
{{ craft.request.urlReferrer.getQuery }}
but that’s not working.
It can be done with some Twig code:

{% set referrer = craft.request.urlReferrer %}

{% if referrer %}
    {# Remove everything before the `?` #}
    {% set queryString = referrer|replace('/^.*\\?/', '') %}

    {# Split the query string into individual params #}
    {% set params = queryString|split('&amp;') %}

    {% for param in params %}
        {# Split this param on the `=` sign #}
        {% set parts = param|split('=') %}
        {% set name = parts[0] %}
        {% set value = parts[1] is defined ? parts[1] %}

        {# Do something with it... #}
    {% endfor %}
{% endif %}


Note that this could would require Craft 2.2 or later, which comes with a regex-enabled replace filter.