Add one-versus-many-matches logic to network filter plugin (#30511)

* Add one-versus-many-matches logic

* Fixed indentation (tabs ==> spaces)
pull/28947/merge
Ivan Pepelnjak 7 years ago committed by Peter Sprygada
parent d23af439ca
commit 9aa1da23f0

@ -56,6 +56,9 @@ def re_matchall(regex, value):
obj = {}
if regex.groupindex:
for name, index in iteritems(regex.groupindex):
if len(regex.groupindex) == 1:
obj[name] = match
else:
obj[name] = match[index - 1]
objects.append(obj)
return objects

Loading…
Cancel
Save