От: | Antik | ||
Дата: | 11.10.10 08:50 | ||
Оценка: |
Matches the preceding item 1 or more times. Equivalent to {1,}.
If used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).
var val = "ABK4CKLJWQQF9ROFD9MSM5Y6TK2DVT";
var pattern = /^[0-9a-zA-Z]{30}$/;
if(pattern.test(val)) {
stdout.println("Success");
} else {
stdout.println("Error");
}
От: | c-smile | http://terrainformatica.com | |
Дата: | 11.10.10 17:41 | ||
Оценка: |