def cleanStringParameter(str_param):
    ' clean up string parameters to avoid confusing Boost '
    if (str_param is not None):
        str_param = str_param.strip('\'"')
        escapes = [' ', "'", '"']
        for escape in escapes:
            str_param = re.sub('(?<!\\\\){}'.format(escape), '\\{}'.format(escape), str_param)
    return str_param
clean up string parameters to avoid confusing Boost
def cleanStringParameter(str_param):
    '  '
    if (str_param is not None):
        str_param = str_param.strip('\'"')
        escapes = [' ', "'", '"']
        for escape in escapes:
            str_param = re.sub('(?<!\\\\){}'.format(escape), '\\{}'.format(escape), str_param)
    return str_param