I understand that Vim does not support regex capture groups. The problem I am trying to solve is being able to easily capture parts of lines. For example, given the following line of python source code:
def is_string(s, *args):
I would like to do something equivalent to using the following PCRE regex, which captures the function's name:
'^def (\w+) ?\(.*'
(the capture group here would match is_string
What would be the idiomatic way in VimScript to specify a regex pattern for what part of a line I am trying to match?