# sphobjinv.re

Helper regexes for `sphobjinv`.

`sphobjinv` is a toolkit for manipulation and inspection of Sphinx objects.inv files.

Author

  Brian Skinn (brian.skinn@gmail.com)

File Created

  5 Nov 2017

Copyright

  (c) Brian Skinn 2016-2025

Source Repository

  https://github.com/bskinn/sphobjinv

Documentation

  https://sphobjinv.readthedocs.io/en/stable

License

  Code: MIT License

  Docs & Docstrings: CC BY 4.0 International License

  See LICENSE.txt for full license terms.

Members

p_data = re.compile('\n ^ # Start of line\n (?P<name>.+?) # --> Name\n \\s+ # Dividing space\n (?P<domain>[^\\s:]+) # --> Domain\n : , re.MULTILINE|re.VERBOSE)

  Compiled re `str` regex pattern for data lines in `str` decompressed inventory files

pb_comments = re.compile(b'^#.*$', re.MULTILINE)

  Compiled re `bytes` pattern for comment lines in decompressed inventory files

pb_data = re.compile(b'\n ^ # Start of line\n (?P<name>.+?) # --> Name\n \\s+ # Dividing space\n (?P<domain>[^\\s:]+) # --> Domain\n : , re.MULTILINE|re.VERBOSE)

  Compiled re `bytes` regex pattern for data lines in `bytes` decompressed inventory files

pb_project = re.compile(b'\n ^ # Start of line\n [#][ ]Project:[ ] # Preamble\n (?P<project>.*?) # Lazy rest of line is project name\n \\r?$ # Ignore, re.MULTILINE|re.VERBOSE)

  Compiled re `bytes` pattern for project line

pb_version = re.compile(b'\n ^ # Start of line\n [#][ ]Version:[ ] # Preamble\n (?P<version>.*?) # Lazy rest of line is version\n \\r?$ # Ignore poss, re.MULTILINE|re.VERBOSE)

  Compiled re `bytes` pattern for version line

ptn_data = '\n ^ # Start of line\n (?P<name>.+?) # --> Name\n \\s+ # Dividing space\n (?P<domain>[^\\s:]+) # --> Domain\n : # Dividing colon\n (?P<role>[^\\s]+) # --> Role\n \\s+ # Dividing space\n (?P<priority>-?\\d+) # --> Priority\n \\s+? # Dividing space\n (?P<uri>\\S*) # --> URI\n \\s+ # Dividing space\n (?P<dispname>.+?) # --> Display name, lazy b/c possible CR\n \\r?$ # Ignore possible CR at EOL\n '

  Regex pattern string used to compile `p_data` and `pb_data`