Commit 36534668 by Sébastien Gross

Change name from re_escape to regex_escape to fit existing function names.

parent c1e40852
......@@ -222,7 +222,7 @@ def version_compare(value, version, operator='eq', strict=False):
except Exception, e:
raise errors.AnsibleFilterError('Version comparison: %s' % e)
def re_escape(string):
def regex_escape(string):
'''Escape all regular expressions special characters from STRING.'''
return re.escape(string)
......@@ -360,7 +360,7 @@ class FilterModule(object):
'search': search,
'regex': regex,
'regex_replace': regex_replace,
're_escape': re_escape,
'regex_escape': regex_escape,
# ? : ;
'ternary': ternary,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment