ExperimentBox/Solutions/Exercise 10.md

20 lines
434 B
Markdown
Raw Normal View History

2022-11-22 19:29:49 +00:00
# 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
/([^@]+)@([^@]*)/
```