Regular Expression (REGEX)

What is a Regular Expression (REGEX)?

"REGEX" is a shortened form of the term "Regular Expression".

A regular expression is a sequence of characters that specifies a match pattern in text.

Regular expressions are often used in text editors, programming languages, and other software applications to search for and manipulate text.

In MIDAS, Regular Expressions can be used to validate entries into custom input fields.

For instance, you could use a Regular Expression to ensure that an input is of a certain length, only contains certain characters, or matches a specific format.

Regular expressions can be very powerful and versatile tools. However, they can also be difficult to learn and use.

Here are some simple Regular Expression examples:

REGEXDescriptionExample That MatchesExample That Doesn't Match
^BOOKValue must start with the letters "BOOK"BOOKEDBLUEBOOK
ING$Value must end with the letters "ING"BOOKINGBOOKED
BOOKINGValue must contain "BOOKING"YOUR BOOKING DETAILSYOU BOOKED
^BOOKING$Value must be exactly "BOOKING"BOOKINGYOUR BOOKING
\dValue must contain a number (digit)2 BOOKINGSTWO BOOKINGS
\DValue must not contain a number (digit)TWO BOOKINGS2 BOOKINGS
^BOOK\d\d$Value must be exactly "BOOK", followed by two single digit numbersBOOK43BOOKING43

For more examples and explanations of Regular Expression syntax, please see our KB article How to use Regular Expressions for custom input validation.


← Back to Glossary