text.regex

Match the user text against a regular expression.

https://docs.meya.ai/docs/triggers-1#regex-trigger

Meya uses the Python regular expression syntax.

Element details

type: meya.text.trigger.regex
class: RegexTrigger
path: /meya/text/trigger/regex/regex.py
signature: regex

Fields

fielddescription               requiredsignaturedefaulttype
specOverride the original spec for this element.nullSpec
botBot used to evaluate this trigger.nullBotRef
actionAction executed if this trigger matches. Check the trigger action guide for more info.TriggerActionEntry
ActionComponentSpec
whenCustom condition for when to evaluate this trigger. Check the trigger when guide for more info.typing.Any
confidenceOverride the default confidence with a custom value for trigger matches.nullReal
regexThe regex (regular expression) pattern to match the user input text against.str
ignorecaseIgnore the case when matching the user text.nullbool

Usage reference

Basic

triggers:
  - when: ANY
    regex: STRING
steps:
  - say: STRING

Full

type: meya.text.trigger.regex
spec:
  type: STRING
  data:
    STRING: ANY
  timeout: 123
  trigger_when: ANY
bot: element.name
action: COMPONENT
when: ANY
confidence: 123
regex: STRING
ignorecase: false