NDEVR
API Documentation
RegexFunctions

Logic for creating regular expressions for certain situations. More...

Static Public Member Functions

static const char * EmailRegex ()
 Gets a regex pattern for validating email addresses.
static const char * FileNameRegex ()
 Gets a regex pattern for validating file names.
static const char * FileRegex ()
 Gets a regex pattern for validating file paths.
static const char * FolderRegex ()
 Gets a regex pattern for validating folder paths.
static String OptionalValues (const Buffer< StringView > &values)
 Builds a regex pattern that matches any one of the given values optionally.
static String UnorderedValues (const Buffer< StringView > &values)
 Builds a regex pattern that matches all of the given values in any order.
static const char * UsernameRegex ()
 Gets a regex pattern for validating usernames.

Detailed Description

Logic for creating regular expressions for certain situations.


Definition at line 9 of file RegexFunctions.h.

Member Function Documentation

◆ EmailRegex()

const char * RegexFunctions::EmailRegex ( )
static

Gets a regex pattern for validating email addresses.

Returns
A regex pattern string for matching valid email addresses.

◆ FileNameRegex()

const char * RegexFunctions::FileNameRegex ( )
static

Gets a regex pattern for validating file names.

Returns
A regex pattern string for matching valid file names.

◆ FileRegex()

const char * RegexFunctions::FileRegex ( )
static

Gets a regex pattern for validating file paths.

Returns
A regex pattern string for matching valid file paths.

Referenced by DesignObjectComboWidget::setNDPO(), DesignObjectSearchWidget::setNDPO(), and DesignObjectStringWidget::setNDPO().

◆ FolderRegex()

const char * RegexFunctions::FolderRegex ( )
static

Gets a regex pattern for validating folder paths.

Returns
A regex pattern string for matching valid folder paths.

◆ OptionalValues()

String RegexFunctions::OptionalValues ( const Buffer< StringView > & values)
static

Builds a regex pattern that matches any one of the given values optionally.

Parameters
[in]valuesThe set of string values to include as optional matches.
Returns
A regex pattern string matching any of the provided values optionally.

◆ UnorderedValues()

String RegexFunctions::UnorderedValues ( const Buffer< StringView > & values)
static

Builds a regex pattern that matches all of the given values in any order.

Parameters
[in]valuesThe set of string values that must all appear in any order.
Returns
A regex pattern string matching all provided values regardless of order.

◆ UsernameRegex()

const char * RegexFunctions::UsernameRegex ( )
static

Gets a regex pattern for validating usernames.

Returns
A regex pattern string for matching valid usernames.

The documentation for this class was generated from the following file: