[Intel-wired-lan] [PATCH 01/38] docs: kdoc_re: add support for groups()
Mauro Carvalho Chehab
mchehab+huawei at kernel.org
Wed Feb 18 10:12:31 UTC 2026
Add an equivalent to re groups() method.
This is useful on debug messages.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>
Acked-by: Randy Dunlap <rdunlap at infradead.org>
Tested-by: Randy Dunlap <rdunlap at infradead.org>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
---
tools/lib/python/kdoc/kdoc_re.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/lib/python/kdoc/kdoc_re.py b/tools/lib/python/kdoc/kdoc_re.py
index 0bf9e01cdc57..774dd747ecb0 100644
--- a/tools/lib/python/kdoc/kdoc_re.py
+++ b/tools/lib/python/kdoc/kdoc_re.py
@@ -106,6 +106,13 @@ class KernRe:
return self.last_match.group(num)
+ def groups(self):
+ """
+ Returns the group results of the last match
+ """
+
+ return self.last_match.groups()
+
class NestedMatch:
"""
--
2.52.0
More information about the Intel-wired-lan
mailing list