b.globbing : module documentation

Part of bzrlib

Tools for converting globs to regular expressions.

This module provides functions for converting shell-like globs to regular expressions.

Class Replacer Do a multiple-pattern substitution.
Class Globster A simple wrapper for a set of glob patterns.
Class ExceptionGlobster A Globster that supports exception patterns.
Function normalize_pattern Converts backslashes in path patterns to forward slashes.
Function _sub_group Undocumented
Function _invalid_regex Undocumented
Function _trailing_backslashes_regex Check trailing backslashes.
Function _sub_extension Undocumented
Class _OrderedGlobster A Globster that keeps pattern order.
def _sub_group(m):
def _invalid_regex(repl):
def _trailing_backslashes_regex(m):
Check trailing backslashes.

Does a head count on trailing backslashes to ensure there isn't an odd one on the end that would escape the brackets we wrap the RE in.

def _sub_extension(pattern):
def normalize_pattern(pattern):
Converts backslashes in path patterns to forward slashes.

Doesn't normalize regular expressions - they may contain escapes.

API Documentation for Bazaar, generated by pydoctor at 2021-09-28 00:25:09.