---
title: RegexSemanticLevel
framework: swift
role: symbol
role_heading: Structure
path: swift/regexsemanticlevel
---

# RegexSemanticLevel

A semantic level to use during regex matching.

## Declaration

```swift
struct RegexSemanticLevel
```

## Overview

Overview The semantic level determines whether a regex matches with the same character-based semantics as string comparisons or by matching individual Unicode scalar values. See matchingSemantics(_:) for more about changing the semantic level for all or part of a regex.

## Topics

### Operators

- [==(_:_:)](swift/regexsemanticlevel/==(_:_:).md)

### Instance Properties

- [hashValue](swift/regexsemanticlevel/hashvalue.md)

### Instance Methods

- [hash(into:)](swift/regexsemanticlevel/hash(into:).md)

### Type Properties

- [graphemeCluster](swift/regexsemanticlevel/graphemecluster.md)
- [unicodeScalar](swift/regexsemanticlevel/unicodescalar.md)

### Default Implementations

- [Equatable Implementations](swift/regexsemanticlevel/equatable-implementations.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### Regular Expressions

- [Regex](swift/regex.md)
- [RegexRepetitionBehavior](swift/regexrepetitionbehavior.md)
- [RegexWordBoundaryKind](swift/regexwordboundarykind.md)
- [AnyRegexOutput](swift/anyregexoutput.md)
- [RegexComponent](swift/regexcomponent.md)
- [CustomConsumingRegexComponent](swift/customconsumingregexcomponent.md)
