Utility class for regular expression patterns and validation.
More...
|
static boolean | isValidatedByRegex (@NotNull final String text, @NotNull final String regex) |
| Validates the given text against the specified regular expression.
|
|
|
| MyRegex () |
| Private constructor to prevent instantiation of this utility class.
|
|
|
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).
|
|
Utility class for regular expression patterns and validation.
This class provides predefined regex patterns and a method for regex validation.
◆ MyRegex()
fr.softsf.sudokufx.utils.MyRegex.MyRegex |
( |
| ) |
|
|
private |
Private constructor to prevent instantiation of this utility class.
◆ 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
-
text | The text to validate (must not be null). |
regex | The regular expression for validation (must not be null). |
- Returns
- true if the text matches the regex pattern; false otherwise.
◆ 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: