---
title: anyNonNewline
framework: swift
role: symbol
role_heading: Type Property
path: swift/regexcomponent/anynonnewline
---

# anyNonNewline

A character class that matches any element that isn’t a newline.

## Declaration

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

## Discussion

Discussion This character class is unaffected by the dotMatchesNewlines() method. To match any character, including newlines, see any. This character class is equivalent to the regex syntax “dot” metacharacter with single-line mode disabled: (?-s:.).

## See Also

### Matching substring sequences

- [anyOf(_:)](swift/regexcomponent/anyof(_:)-3pexl.md)
- [anyOf(_:)](swift/regexcomponent/anyof(_:)-4xgea.md)
- [any](swift/regexcomponent/any.md)
- [anyGraphemeCluster](swift/regexcomponent/anygraphemecluster.md)
- [digit](swift/regexcomponent/digit.md)
- [hexDigit](swift/regexcomponent/hexdigit.md)
- [word](swift/regexcomponent/word.md)
