?
-
Is it possible to use regexp to check whether a string has a total
length of x characters if the string accepts optional parameters for e.g
[OptionalPrefix] VALUE [OptionalPostfix]
where each of the token can be of any length but the total length must
be less than x?
Is it possible or do I have to use:
if (string.matches(regexp) && string.length() < x) {
...
}
length of x characters if the string accepts optional parameters for e.g
[OptionalPrefix] VALUE [OptionalPostfix]
where each of the token can be of any length but the total length must
be less than x?
Is it possible or do I have to use:
if (string.matches(regexp) && string.length() < x) {
...
}