---
title: NegativeLookahead
framework: regexbuilder
role: symbol
role_heading: Structure
path: regexbuilder/negativelookahead
---

# NegativeLookahead

A regex component that allows a match to continue only if its contents do not match at the given location.

## Declaration

```swift
struct NegativeLookahead<Output>
```

## Overview

Overview A negative lookahead is a zero-length assertion that its included regex does not match at a particular position. Lookaheads do not advance the overall matching position in the input string — once a lookahead succeeds, matching continues in the regex from the same position.

## Topics

### Initializers

- [init(_:)](regexbuilder/negativelookahead/init(_:)-3fsnx.md)
- [init(_:)](regexbuilder/negativelookahead/init(_:)-4fh1d.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [RegexComponent](swift/regexcomponent.md)

## See Also

### Components

- [CharacterClass](regexbuilder/characterclass.md)
- [Anchor](regexbuilder/anchor.md)
- [Lookahead](regexbuilder/lookahead.md)
- [ChoiceOf](regexbuilder/choiceof.md)
