mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
docs: kdoc_re: add support for groups()
Add an equivalent to re groups() method. This is useful on debug messages. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20d1a9c77200e28cc2ff1d6122635c43f8ba6a71.1772469446.git.mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Jonathan Corbet
parent
6801cc4936
commit
2b144a30a4
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user