Dontopedia

re.sub

From Dontopedia, the open, paraconsistent wiki. (Last updated 2026-06-10.)

re.sub has 16 facts recorded in Dontopedia across 6 references, with 4 live disagreements.

16 facts·6 predicates·6 sources·4 in dispute

Mostly:rdf:type(5), used in(3), belongs to list(2)

Maturity scale raw canonical shape-checked rule-derived certified

Inbound mentions (8)

Other subjects in dontopedia point AT this entity as a value. These are inverse relationships — e.g. "X motherOf this subject" — and answer questions the forward facts can't. Grouped by predicate.

usesUses(4)

usesFunctionUses Function(2)

providesFunctionProvides Function(1)

usesRegexSubstitutionUses Regex Substitution(1)

Other facts (13)

The long tail: predicates that appear too rarely to warrant their own section. Filter or scroll to find a specific one. Each row links to its source.

Timeline

Timeline axis is valid_time — when each source says the fact was true in the world, not when Dontopedia learned about it. Retracted rows are kept for provenance; coloured stripes indicate the context kind.

typebeam/d2240aff-8324-4088-8249-57faedfdb0bd
ex:RegexSubstitutionFunction
labelbeam/d2240aff-8324-4088-8249-57faedfdb0bd
Regular Expression Substitution
removesCharactersMatchingbeam/d2240aff-8324-4088-8249-57faedfdb0bd
ex:non-alphanumeric-pattern
typebeam/f67317d2-e3a7-4bc8-ad8f-aa0c26b26a70
ex:Function
labelbeam/f67317d2-e3a7-4bc8-ad8f-aa0c26b26a70
re.sub
returnsbeam/f67317d2-e3a7-4bc8-ad8f-aa0c26b26a70
ex:modified-string
usedInbeam/f67317d2-e3a7-4bc8-ad8f-aa0c26b26a70
ex:rewrite-query-method
typebeam/f06bfe06-9306-4e2e-b148-b9f8f0542363
ex:PythonFunction
labelbeam/f06bfe06-9306-4e2e-b148-b9f8f0542363
re.sub
requiresModulebeam/f06bfe06-9306-4e2e-b148-b9f8f0542363
ex:re-module
belongsToListbeam/2446c55d-3e7d-4dce-b1a2-10ccc35b4cca
ex:regex-module-functions
belongsToListbeam/2446c55d-3e7d-4dce-b1a2-10ccc35b4cca
ex:regex-module
typebeam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
ex:PythonFunction
typebeam/6160f680-6610-43df-b520-efa8dbd5ff46
ex:regular-expression-function
usedInbeam/6160f680-6610-43df-b520-efa8dbd5ff46
ex:apply-keyword-substitution-method
usedInbeam/6160f680-6610-43df-b520-efa8dbd5ff46
ex:apply-pattern-matching-method

References (6)

6 references
  1. ctx:claims/beam/d2240aff-8324-4088-8249-57faedfdb0bd
    • full textbeam-chunk
      text/plain1 KBdoc:beam/d2240aff-8324-4088-8249-57faedfdb0bd
      Show excerpt
      raise ValueError(f"Invalid value for field '{field}'") def _validate_value(self, field, value): if field == "query": return self._validate_query(value) elif field == "context": re
  2. ctx:claims/beam/f67317d2-e3a7-4bc8-ad8f-aa0c26b26a70
  3. ctx:claims/beam/f06bfe06-9306-4e2e-b148-b9f8f0542363
    • full textbeam-chunk
      text/plain1 KBdoc:beam/f06bfe06-9306-4e2e-b148-b9f8f0542363
      Show excerpt
      Optimize the parsing logic to improve performance, especially for high-throughput scenarios. ### Example Code Here's an example of how you might implement these steps: ```python import logging from typing import List # Configure logging
  4. ctx:claims/beam/2446c55d-3e7d-4dce-b1a2-10ccc35b4cca
    • full textbeam-chunk
      text/plain1 KBdoc:beam/2446c55d-3e7d-4dce-b1a2-10ccc35b4cca
      Show excerpt
      def expand_query(self, query): for pattern, replacement in self.rules: query = re.sub(pattern, replacement, query) return query # Example usage: rewriter = QueryRewriter() query = "SELECT * FROM table WHERE
  5. ctx:claims/beam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
    • full textbeam-chunk
      text/plain1 KBdoc:beam/730c48fc-40c0-4bb9-aa45-3ee6f2bdd32c
      Show excerpt
      query = self.sanitize_query(query) query = self.apply_keyword_substitution(query) query = self.apply_pattern_matching(query) query = self.apply_contextual_expansion(query) return query def saniti
  6. ctx:claims/beam/6160f680-6610-43df-b520-efa8dbd5ff46
    • full textbeam-chunk
      text/plain1 KBdoc:beam/6160f680-6610-43df-b520-efa8dbd5ff46
      Show excerpt
      (r'\bOR\b', 'ORELSE') ] self.contextual_expansions = { 'table': 'TABLE_NAME', 'condition': 'CONDITION_VALUE' } def rewrite_query(self, query): try: expande

See also

Keep researching

Missing something or suspicious of what's here? Kick off a research session — a Claude agent will investigate, cite its sources, and file new facts into a dedicated context you can review before accepting into the shared view.