arelle.utils.validate.Characters

See COPYRIGHT.md for copyright information.

Module Contents

Functions

findProhibitedCharacters

Find all characters in text that match the prohibited-character pattern.

API

arelle.utils.validate.Characters.findProhibitedCharacters(text: str | None, pattern: regex.Pattern[str]) set[str]

Find all characters in text that match the prohibited-character pattern.

A prohibited-character pattern typically matches characters NOT in an allowed set.

Parameters:
  • text – Text to scan (None or empty returns empty set)

  • pattern – Compiled regex that matches prohibited characters

Returns:

Set of matched prohibited characters