From 5311bb9011454a378ef57fb80af171c5ce1aedb6 Mon Sep 17 00:00:00 2001 From: "nguyen.duc.anh.tuan" Date: Tue, 21 Nov 2017 13:50:25 +0700 Subject: [PATCH] Group 6 --- Homeworks/Answer.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Homeworks/Answer.md diff --git a/Homeworks/Answer.md b/Homeworks/Answer.md new file mode 100644 index 0000000..33d98fe --- /dev/null +++ b/Homeworks/Answer.md @@ -0,0 +1,35 @@ +## Homework 1 + +## Homework 2 +Write regex that match all words: + +Have 5 characters +Not start with `a`, `b`, `e`, `k` +Second character is not `g`, `m`, `k`, `b` +Fourth character is `f` +End with `e` + +/^[^abek][^gmkb]\wfe$/ + +## Homework 3 +Write regex that match all words: + +start with `c` but the next char is not `h` +End with `te` + +/^c[^h]\w*te$/ + +## Homework 4 +Write regex that match all words: + +Have either `sign` or `ect` or `sis` +Not end with `xt`, `de`, `me` + +/^\w*(sign|ect|sis)+(?!\w*(xt|de|me)$)\w*$/ + +## Homework 5 + +Write regex that match all words: + +Do not have `trac` +/^((?!trac)\w)*$/