From 7d1a2ec924f7a2b94a8e5bdc71344c21d9cda5e0 Mon Sep 17 00:00:00 2001 From: wangshuangshuang Date: Thu, 13 Dec 2018 16:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/anchor_end.js | 2 ++ lib/anchor_start.js | 2 ++ lib/char_class.js | 2 ++ lib/negated_char_class.js | 1 + 4 files changed, 7 insertions(+) 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..0ce3071 100644 --- a/lib/anchor_start.js +++ b/lib/anchor_start.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TOOD + const regx=/^LITERALLY/; + return regx.test(str); } \ No newline at end of file diff --git a/lib/char_class.js b/lib/char_class.js index a08ee57..4ceabe4 100644 --- a/lib/char_class.js +++ b/lib/char_class.js @@ -1,3 +1,5 @@ module.exports = function (str) { // TODO + const reg=/^[a1u4o]/; + 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..9252d08 100644 --- a/lib/negated_char_class.js +++ b/lib/negated_char_class.js @@ -1,3 +1,4 @@ module.exports = function (str) { // TODO + return str.match(/\D[^A-Z]/) } \ No newline at end of file