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

# any

A character class that matches any element.

## Declaration

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

## Discussion

Discussion This character class is unaffected by the dotMatchesNewlines() method. To match any character that isn’t a newline, see anyNonNewline. This character class is equivalent to the regex syntax “dot” metacharacter in single-line mode: (?s:.).

## See Also

### Matching substring sequences

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