Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Homeworks/Answer.md
Original file line number Diff line number Diff line change
@@ -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)*$/