---
title: horizontalWhitespace
framework: swift
role: symbol
role_heading: Type Property
path: swift/regexcomponent/horizontalwhitespace
---

# horizontalWhitespace

A character class that matches any element that is classified as horizontal whitespace.

## Declaration

```swift
static var horizontalWhitespace: CharacterClass { get }
```

## Discussion

Discussion This character class is equivalent to \h in regex syntax.

## See Also

### Matching whitespace and line endings

- [newlineSequence](swift/regexcomponent/newlinesequence.md)
- [verticalWhitespace](swift/regexcomponent/verticalwhitespace.md)
- [whitespace](swift/regexcomponent/whitespace.md)
