mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -07:00
Change name from re_escape to regex_escape to fit existing function names.
This commit is contained in:
parent
c1e4085251
commit
36534668f0
1 changed files with 2 additions and 2 deletions
|
@ -222,7 +222,7 @@ def version_compare(value, version, operator='eq', strict=False):
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
raise errors.AnsibleFilterError('Version comparison: %s' % e)
|
raise errors.AnsibleFilterError('Version comparison: %s' % e)
|
||||||
|
|
||||||
def re_escape(string):
|
def regex_escape(string):
|
||||||
'''Escape all regular expressions special characters from STRING.'''
|
'''Escape all regular expressions special characters from STRING.'''
|
||||||
return re.escape(string)
|
return re.escape(string)
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ class FilterModule(object):
|
||||||
'search': search,
|
'search': search,
|
||||||
'regex': regex,
|
'regex': regex,
|
||||||
'regex_replace': regex_replace,
|
'regex_replace': regex_replace,
|
||||||
're_escape': re_escape,
|
'regex_escape': regex_escape,
|
||||||
|
|
||||||
# ? : ;
|
# ? : ;
|
||||||
'ternary': ternary,
|
'ternary': ternary,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue