AutoVoice AutoVoice Command Filter regex

Discussion in 'AutoApps' started by Alexandr, Jul 15, 2018.

  1. Alexandr

    Alexandr New Member

    Joined:
    Jul 15, 2018
    Messages:
    2
    Likes Received:
    0
    I am using command:
    Add (?<productname>.+) to (?<list>.+) at (?<productprice>.+)
    It works fine if I say:
    Add apples to basket at 30
    How to trigger the command without saying the list name or price? ("Add apples" or "Add apples to basket")
    Tryid like this:
    Add (?<productname>.+) ?(to|) ?(|?<list>.+) ?(at|) ?(|?<productprice>.+)
    But it does not work. Please, help.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    You need to give each group a name. Check here for more info.
     
  3. Alexandr

    Alexandr New Member

    Joined:
    Jul 15, 2018
    Messages:
    2
    Likes Received:
    0
    One neat trick though, is to ignore groups with “?:”, so you could do this for example “(?:turn|change) to channel (?<channel>[0-9]+)” and the (turn|change) group would be ignored, making the “channel” variable populate correctly.

    It does not work for me
     

Share This Page