def jobparams_prefiltering(value):
    """
    Perform pre-filtering of raw job parameters to avoid problems with especially quotation marks.
    The function can extract some fields from the job parameters to be put back later after actual filtering.

    E.g. ' --athenaopts "HITtoRDO:--nprocs=$ATHENA_CORE_NUMBER" ' will otherwise become
    ' --athenaopts 'HITtoRDO:--nprocs=$ATHENA_CORE_NUMBER' ' which will prevent the environmental variable to be unfolded.

    :param value: job parameters (string).
    :return: list of fields excluded from job parameters (list), updated job parameters (string).
    """

    exclusions = {}

    # Add regex patterns here

    return exclusions, value