SudokuFX
Loading...
Searching...
No Matches
fr.softsf.sudokufx.utils.MyRegex Class Reference

Utility class for regular expression patterns and validation. More...

+ Collaboration diagram for fr.softsf.sudokufx.utils.MyRegex:

Static Public Member Functions

static boolean isValidatedByRegex (@NotNull final String text, @NotNull final String regex)
 Validates the given text against the specified regular expression.
 

Private Member Functions

 MyRegex ()
 Private constructor to prevent instantiation of this utility class.
 

Static Private Attributes

static final String ALPHANUMERIC = "^[a-zA-Z0-9\\s]+$"
 Regex pattern for alphanumeric strings (including spaces).
 
static final String SECRET = "^(?=(?:[^a-z]*[a-z]){2})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[^0-9]*[0-9]){2})(?=(?:[^@#$%^&()!]*[@#$%^&()!]){2})[a-zA-Z0-9@#$%^&()!]{24}$"
 Regex pattern for a secure password.
 
static final String VERSION = "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
 Regex pattern for semantic versioning format (X.Y.Z).
 

Detailed Description

Utility class for regular expression patterns and validation.

This class provides predefined regex patterns and a method for regex validation.

Constructor & Destructor Documentation

◆ MyRegex()

fr.softsf.sudokufx.utils.MyRegex.MyRegex ( )
private

Private constructor to prevent instantiation of this utility class.

Member Function Documentation

◆ isValidatedByRegex()

static boolean fr.softsf.sudokufx.utils.MyRegex.isValidatedByRegex ( @NotNull final String text,
@NotNull final String regex )
static

Validates the given text against the specified regular expression.

Parameters
textThe text to validate (must not be null).
regexThe regular expression for validation (must not be null).
Returns
true if the text matches the regex pattern; false otherwise.

Member Data Documentation

◆ ALPHANUMERIC

final String fr.softsf.sudokufx.utils.MyRegex.ALPHANUMERIC = "^[a-zA-Z0-9\\s]+$"
staticprivate

Regex pattern for alphanumeric strings (including spaces).

Matches strings containing only letters, numbers, and spaces.

◆ SECRET

final String fr.softsf.sudokufx.utils.MyRegex.SECRET = "^(?=(?:[^a-z]*[a-z]){2})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[^0-9]*[0-9]){2})(?=(?:[^@#$%^&()!]*[@#$%^&()!]){2})[a-zA-Z0-9@#$%^&()!]{24}$"
staticprivate

Regex pattern for a secure password.

Requirements: - At least 2 lowercase characters - At least 2 uppercase characters - At least 2 numbers - At least 2 special characters from #$%^&()! - Exactly 24 characters in total

◆ VERSION

final String fr.softsf.sudokufx.utils.MyRegex.VERSION = "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
staticprivate

Regex pattern for semantic versioning format (X.Y.Z).

Matches version numbers like 1.0.0, 2.10.5, etc.


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