mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2025-03-28 14:07:02 +00:00
parent
94f31d0620
commit
1c0003a7e0
@ -77,9 +77,9 @@ function is_short_string($str) {
|
||||
}
|
||||
|
||||
function validateCodeforcesProblemId($str) {
|
||||
return preg_match('/(|GYM)[1-9][0-9]{0,5}[A-Z][1-9]?/', $str) !== true;
|
||||
return preg_match('/^(|GYM)[1-9][0-9]{0,5}[A-Z][1-9]?$/', $str);
|
||||
}
|
||||
|
||||
function validateLuoguProblemId($str) {
|
||||
return preg_match('/P[1-9][0-9]{4,5}/', $str) !== true;
|
||||
return preg_match('/^P[1-9][0-9]{3,5}$/', $str);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user