from .base import BaseTemplateExtension as BaseTemplateExtension, TemplateFunction as TemplateFunction
from _typeshed import Incomplete
from homeassistant.helpers.template import TemplateEnvironment as TemplateEnvironment
from typing import Any

_regex_cache: Incomplete

class RegexExtension(BaseTemplateExtension):
    def __init__(self, environment: TemplateEnvironment) -> None: ...
    def regex_match(self, value: Any, find: str = '', ignorecase: bool = False) -> bool: ...
    def regex_replace(self, value: Any = '', find: str = '', replace: str = '', ignorecase: bool = False) -> str: ...
    def regex_search(self, value: Any, find: str = '', ignorecase: bool = False) -> bool: ...
    def regex_findall_index(self, value: Any, find: str = '', index: int = 0, ignorecase: bool = False) -> str: ...
    def regex_findall(self, value: Any, find: str = '', ignorecase: bool = False) -> list[str]: ...
