mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-25 15:51:52 +00:00
fix: luogu problem id validator
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
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…
Reference in New Issue
Block a user