---
title: Std.Regex
---

Regular expression matching and replacement using POSIX-style patterns.

## Functions

### match

```saga
fun match : (pattern: String) -> (s: String) -> Bool
```

Returns True if the string matches the pattern.

### find

```saga
fun find : (pattern: String) -> (s: String) -> Maybe String
```

Returns the first match of the pattern in the string, or Nothing.

### find_all

```saga
fun find_all : (pattern: String) -> (s: String) -> List String
```

Returns all non-overlapping matches of the pattern in the string.

### replace

```saga
fun replace : (pattern: String) -> (s: String) -> (replacement: String) -> String
```

Replaces the first match of the pattern with the replacement string.

### replace_all

```saga
fun replace_all : (pattern: String) -> (s: String) -> (replacement: String) -> String
```

Replaces all matches of the pattern with the replacement string.

