Regular Expression (REGEX)
What is a Regular Expression (REGEX)?
A regular expression (REGEX) is a sequence of characters that defines a search pattern, used to find, match, and manipulate text. Regular expressions are widely used in text editors, programming languages, and other software applications to search for and work with text that matches a particular pattern. Here are some simple examples:What are regular expressions used for?
A regular expression lets you check whether text meets certain criteria - for instance, that it is a certain length, contains only certain characters, or matches a specific format. They are powerful and versatile tools, although they can take some time to learn.REGEX Description Matches Does Not Match ^BOOK Must start with "BOOK" BOOKED BLUEBOOK ING$ Must end with "ING" BOOKING BOOKED BOOKING Must contain "BOOKING" YOUR BOOKING DETAILS YOU BOOKED ^BOOKING$ Must be exactly "BOOKING" BOOKING YOUR BOOKING \d Must contain a digit 2 BOOKINGS TWO BOOKINGS \D Must not be only digits TWO BOOKINGS 2 BOOKINGS ^BOOK\d\d$ "BOOK" followed by exactly two digits BOOK43 BOOKING43 Regular expressions in MIDAS
In MIDAS, regular expressions can be used to validate entries in custom input fields, ensuring data is entered in exactly the format you require. For more examples, see our guide How to use Regular Expressions for custom input validation.
Glossary » REGEX