qufe.excludebracket module
Bracket content removal utilities.
This module provides functions to validate and remove content within brackets from text strings with proper bracket pairing validation.
- qufe.excludebracket.check_eb(text, open_bracket, close_bracket)[source]
Validate bracket pairing in text.
- qufe.excludebracket.eb2(text, open_bracket, close_bracket)[source]
Remove content within brackets from text.
- Parameters:
- Returns:
Text with bracket content removed, or 0 if validation fails
- Return type:
Example
>>> eb2("Hello (world) test", "(", ")") 'Hello test'