tiled.queries.Regex

class tiled.queries.Regex(key: str, pattern: str, case_sensitive: bool = True)[source]

Match a key’s value to a regular expression.

Parameters:
keystr

e.g. “color”, “sample.name”

patternstr

regular expression

case_sensitivebool, optional

Default True (case-sensitive). Note that this is the opposite of the default for FullText; regex users generally expect case sensitivity by default.

Examples

Search for color == “red”

>>> c.search(Regex("sample.name", "Cu.*"))
__init__(key: str, pattern: str, case_sensitive: bool = True) None

Methods

__init__(key, pattern[, case_sensitive])

decode(*, key, pattern[, case_sensitive])

encode()

Attributes

case_sensitive

key

pattern