LogoLogo
  • 👋START HERE
    • Welcome!
  • â„šī¸General
    • Release Notes
      • Full Feature Base Template
      • Services
      • Rule-based Automation
        • May 2025
        • February 2025
        • January 2025
        • December 2024
        • November 2024
        • October 2024
        • September 2024
        • August 2024
        • July 2024
        • June 2024
        • May 2024
        • April 2024
        • March 2024
        • February 2024
        • January 2024
        • 2023
        • 2022
        • 2021
        • Dialog Design Update
    • Glossary of Terms
    • Authentication Methods
      • SSO (Single Sign-On)
      • Built-In User Management
    • Acceptable Use Policy
  • âš™ī¸Rule-based Automation
    • Overview
      • Account Settings
        • Profile
        • Team
        • Roles and Permissions
          • User Management
          • Project Permissions
      • Basic Concepts
        • Project Management
        • Version Management
        • Multi-Lingual Bots
          • Supported Languages
        • Managing User Interactions
          • Unexpected User Input
          • No User Input
    • Dialog Interface
      • Blocks
        • Conversation Logic
          • Start Conversation
          • Global
          • State
          • Intermediate Response
          • To Previous State
          • End Conversation
        • Subdialog
          • Reusable Subdialogs
        • Phone
          • Continue Listening
          • Call Control
        • Technical Logic
          • Service
          • Condition
          • Storage
        • Other
          • Note
      • Speech Assets
        • Intents
          • Utterances
          • Descriptions
        • Slots
          • Custom Slots
            • List Slots
            • Machine Learning Slots
            • Regex Slots
            • LLM Slots
          • Prebuilt Slots
            • DTMF Slot
        • Text Snippets
        • Dictionary
      • Variables
        • Intents
        • Slots
        • Storage
        • Text Snippets
        • Environments
        • Platform
        • Context
      • Services
        • Service Integration Guide
        • Service Development
        • Service Branches and Error Handling
        • Public Services
          • Date and Birthdate Recognition
          • Spelling Post-Processing for Phone
          • IBAN Validation
          • License Plate Validation
          • Address Search
          • Street Names per Postal Code
          • Email Service
          • SMS Service
          • API Adapter
          • Salesforce-Flow Connector
          • Opening Hours
          • Speech-to-Text Hints
          • Fuzzy Match Names
          • Delay Service
      • Debugger
        • Phone 2
        • WhatsApp
        • Textchat 2
    • Environments Interface
      • Service Keys
    • Deployments Interface
      • Creating a Release
      • Editing a Release
    • Text-to-Speech
      • Azure
      • ElevenLabs
      • OpenAI via Azure (Preview)
      • SSML
        • Audio
        • Break
        • Emphasis
        • Prosody
        • Say-as
        • Substitute
        • Paragraph and Sentence
        • Voice
    • Autocomplete
    • Parloa APIs
      • CallData Service and API
      • Conversation History API
      • Textchat V2 API
    • Phone Integrations
      • Genesys Cloud
        • Setting up the SIP Trunk
        • Sending/Receiving UUI Data
        • Creating a Script to Display UUI
      • SIP
      • Tenios
        • Setting Up an Inbound Connection
        • Setting Up an Outbound Connection
        • Transferring a Call
      • Twilio
      • Public IPs and Port Information
    • AI Integration Overview
      • Dual Intent Recognizer (DIR)
      • Dual Tone Multifrequency (DTMF) Intent
    • Analytics and Debugging
      • Understanding Conversations and Transactions
      • Managing Caller ID Data
      • Hangup Events and Triggered Analytics
      • Analytics Transactions: Data Structure and Insights
      • Dialog Analytics
      • Audit Logs
      • Parloa-hosted Analytics
    • Data Privacy
      • Anonymizing Personally Identifiable Information
    • NLU Training
      • NLU Training Best Practices
    • How To
      • Create a Scalable and Maintainable Bot Architecture
      • Implement OnError Loop Handling
      • Resolve the 'Service Unavailable' Error
    • Reference
      • Parloa Keyboard Shortcuts
      • Frequently Asked Questions (FAQ)
      • JavaScript Cheat Sheet
        • Using Regular Expressions (Regex)
  • 🧠Knowledge Skill
    • Introduction
    • Knowledge Collections
    • Knowledge Sources
    • Knowledge Skill Setup
      • Step 1 – Create a Knowledge Skill Agent
      • Step 2 – Configure a Knowledge Skill Agent
      • Step 3 – Configure a Knowledge Skill Agent
Powered by GitBook
On this page
  • Overview
  • Use Case Example: Customer Number Verification
  • Basic Regex Syntax

Was this helpful?

Export as PDF
  1. Rule-based Automation
  2. Dialog Interface
  3. Speech Assets
  4. Slots
  5. Custom Slots

Regex Slots

Description and how to use the Regex slots

PreviousMachine Learning SlotsNextLLM Slots

Last updated 1 year ago

Was this helpful?

Overview

Regex Slots offer a robust way to validate specific types of user input in Parloa's platform. Through the use of , you can ensure that the data provided by the user meets certain criteria or follows a specific format.

Use Case Example: Customer Number Verification

For instance, if a customer calls and says, "Hi, my customer number is KV U 3 3452363, is this correct?", a Regex Slot could be used to validate the format of the provided customer number.

Steps to Use Regex Slots

  1. Add to Speech Assets: First, you'll need to add a Regex Slot to your Speech Assets in Parloa.

  2. Define the Regex Pattern: In the Regex Slot, specify the pattern that you want to validate.

For instance, a simplified Regex pattern to match the customer number could look something like this:

KV\s?[Uu]\s?[3]\s?\d{7}

This slot enables the validation of Parloa slot function values using . For example, a client could call and use their customer number as follows:

Hi, my customer number is KV U 3 3452363, is this correct?

Once added to your , you must define the RegEx pattern that the slot should identify.

You can create multiple Regex slots within your Speech Assets for different expressions, as well as add multiple expressions within a Regex slot (for example, if there are multiple formats for customer numbers).

Here is an example of a simple expression:

Let's break down the pattern:

Basic Regex Syntax

The following table provides some essential regex syntax that can be useful for you:

Syntax
Description

.

Matches any single character except a newline.

\d

Matches any digit (0-9).

\D

Matches any non-digit character.

\w

Matches any word character (alphanumeric or underscore).

\W

Matches any non-word character.

\s

Matches any white space character.

\S

Matches any non-whitespace character.

[abc]

Matches any character inside the brackets.

[^abc]

Matches any character not in the specified set (not a, b, or c).

*

Matches zero or more occurrences of the preceding element.

+

Matches one or more occurrences of the preceding element.

?

Matches zero or one occurrence of the preceding element.

{n}

Matches exactly n occurrences of the preceding element.

{n,}

Matches n or more occurrences of the preceding element.

{n,m}

Matches between n and m occurrences of the preceding element.

^

Matches the start of a string.

$

Matches the end of a string.

()

Groups multiple elements together and captures the matched text.

`

`

\

Escapes a special character to be treated as a literal character.

âš™ī¸

A

Matches the literal character 'A'.

[ -]?

Specifies an optional space or hyphen character.

\d{7}

Matches exactly seven digits.

Regular Expressions (Regex)
regular expressions (Regex)
Speech Assets