Add solutions
This commit is contained in:
parent
9af35e8cb9
commit
025bfa7a7f
1 changed files with 19 additions and 0 deletions
19
Solutions/Exercise 10.md
Normal file
19
Solutions/Exercise 10.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Exercise 10
|
||||||
|
## Levenstein-Distanz
|
||||||
|
|
||||||
|
| Input | Reference | Distance |
|
||||||
|
| ----------- | ----------- | :------: |
|
||||||
|
| `AUSTAUSCH` | `AUFBAUSCH` | $2$ |
|
||||||
|
| `BARBAREN` | `BARBARA` | $2$ |
|
||||||
|
| `COCACOLA` | `COCAINA` | $3$ |
|
||||||
|
|
||||||
|
## Reguläre Ausdrücke (Regex)
|
||||||
|
### a)
|
||||||
|
```js
|
||||||
|
/^(((2(5[0-5]|[0-4][0-9]))|((1[0-9]|[1-9])?[0-9]))\.){3}((2(5[0-5]|[0-4][0-9]))|((1[0-9]|[1-9])?[0-9]))$/
|
||||||
|
```
|
||||||
|
|
||||||
|
### b)
|
||||||
|
```js
|
||||||
|
/([^@]+)@([^@]*)/
|
||||||
|
```
|
Loading…
Reference in a new issue