def simple_version_match(pat=r'<STR_LIT>', ignore='<STR_LIT>', start='<STR_LIT>'):
def matcher(self, version_string):<EOL><INDENT>version_string = version_string.replace('<STR_LIT:\n>', '<STR_LIT:U+0020>')<EOL>pos = <NUM_LIT:0><EOL>if start:<EOL><INDENT>m = re.match(start, version_string)<EOL>if not m:<EOL><INDENT>return None<EOL><DEDENT>pos = m.end()<EOL><DEDENT>while True:<EOL><INDENT>m = re.search(pat, version_string[pos:])<EOL>if not m:<EOL><INDENT>return None<EOL><DEDENT>if ignore and re.match(ignore, m.group(<NUM_LIT:0>)):<EOL><INDENT>pos = m.end()<EOL>continue<EOL><DEDENT>break<EOL><DEDENT>return m.group(<NUM_LIT:0>)<EOL><DEDENT>return matcher<EOL>
Simple matching of version numbers, for use in CCompiler and FCompiler.

Parameters
----------
pat : str, optional
    A regular expression matching version numbers.
    Default is ``r'[-.\\d]+'``.
ignore : str, optional
    A regular expression matching patterns to skip.
    Default is ``''``, in which case nothing is skipped.
start : str, optional
    A regular expression matching the start of where to start looking
    for version numbers.
    Default is ``''``, in which case searching is started at the
    beginning of the version string given to `matcher`.

Returns
-------
matcher : callable
    A function that is appropriate to use as the ``.version_match``
    attribute of a `CCompiler` class. `matcher` takes a single parameter,
    a version string.