---
title: newlineSequence
framework: swift
role: symbol
role_heading: Type Property
path: swift/regexcomponent/newlinesequence
---

# newlineSequence

A character class that matches any newline sequence.

## Declaration

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

## Discussion

Discussion This character class is equivalent to \R or \n in regex syntax.

## See Also

### Matching whitespace and line endings

- [horizontalWhitespace](swift/regexcomponent/horizontalwhitespace.md)
- [verticalWhitespace](swift/regexcomponent/verticalwhitespace.md)
- [whitespace](swift/regexcomponent/whitespace.md)
