diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..9a441e4 Binary files /dev/null and b/.DS_Store differ diff --git a/lib/anchor_end.js b/lib/anchor_end.js index 56e8b85..9f242ab 100644 --- a/lib/anchor_end.js +++ b/lib/anchor_end.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TOOD + const reg=/BANANAS$/; + return reg.test(str); } \ No newline at end of file diff --git a/lib/anchor_start.js b/lib/anchor_start.js index 56e8b85..844101f 100644 --- a/lib/anchor_start.js +++ b/lib/anchor_start.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TOOD + const pattern=/^LITERALLY/; + return pattern.test(str); } \ No newline at end of file diff --git a/lib/char_class.js b/lib/char_class.js index a08ee57..2feb948 100644 --- a/lib/char_class.js +++ b/lib/char_class.js @@ -1,3 +1,6 @@ module.exports = function (str) { // TODO + // b不行 数字可以 大写不行 + var reg=/^[auo14]/; + return reg.test(str); } \ No newline at end of file diff --git a/lib/negated_char_class.js b/lib/negated_char_class.js index a08ee57..4f29686 100644 --- a/lib/negated_char_class.js +++ b/lib/negated_char_class.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + const reg=/^[^0-9][^A-Z]/; + return reg.test(str); } \ No newline at end of file