From 6f1885c02e8b89930fb08d71ab43a181f6f73bfb Mon Sep 17 00:00:00 2001 From: oNguyenVanHoan Date: Wed, 15 Nov 2017 14:02:21 +0700 Subject: [PATCH] Group 3 --- Answer.md | 27 +++++++++ Homework_1.rb | 7 +++ data.txt | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++ result.txt | 146 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 330 insertions(+) create mode 100644 Answer.md create mode 100644 Homework_1.rb create mode 100644 data.txt create mode 100644 result.txt diff --git a/Answer.md b/Answer.md new file mode 100644 index 0000000..7c115db --- /dev/null +++ b/Answer.md @@ -0,0 +1,27 @@ +Homework 2: Write regex that match all words +2.1 Have 5 characters +2.2 Not start with a, b, e, k +2.3 Second character is not g, m, k, b +2.4 Fourth character is f +2.5 End with e + + [^abek][^gmkb]\wfe + + +Homework 3: Write regex that match all words +3.1 Start with c but the next char is not h +3.2 End with te + + c[^h]\w*te + + +Homework 4: Write regex that match all words +4.1 Have either sign or ect or sis +4.2 Not end with xt, de, me + + .*(sign|ect|sis).*(?