Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

551. 学生出勤记录 I #39

Open
pigpigever opened this issue Dec 31, 2019 · 0 comments
Open

551. 学生出勤记录 I #39

pigpigever opened this issue Dec 31, 2019 · 0 comments
Labels
字符串 关于字符串的题目 正则

Comments

@pigpigever
Copy link
Owner

解题思路

利用正则表达式匹配字符串

代码

/**
 * @param {string} s
 * @return {boolean}
 */
var checkRecord = function(s) {
    return !/(A.*A.*|LLL)/.test(s)
};
@pigpigever pigpigever added 字符串 关于字符串的题目 正则 labels Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
字符串 关于字符串的题目 正则
Projects
None yet
Development

No branches or pull requests

1 participant