---
title: NSRegularExpression.Options
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsregularexpression/options-swift.struct
---

# NSRegularExpression.Options

These constants define the regular expression options. These constants are used by the property options, regularExpressionWithPattern:options:error:, and init(pattern:options:).

## Declaration

```swift
struct Options
```

## Topics

### Constants

- [caseInsensitive](foundation/nsregularexpression/options-swift.struct/caseinsensitive.md)
- [allowCommentsAndWhitespace](foundation/nsregularexpression/options-swift.struct/allowcommentsandwhitespace.md)
- [ignoreMetacharacters](foundation/nsregularexpression/options-swift.struct/ignoremetacharacters.md)
- [dotMatchesLineSeparators](foundation/nsregularexpression/options-swift.struct/dotmatcheslineseparators.md)
- [anchorsMatchLines](foundation/nsregularexpression/options-swift.struct/anchorsmatchlines.md)
- [useUnixLineSeparators](foundation/nsregularexpression/options-swift.struct/useunixlineseparators.md)
- [useUnicodeWordBoundaries](foundation/nsregularexpression/options-swift.struct/useunicodewordboundaries.md)

### Initializers

- [init(rawValue:)](foundation/nsregularexpression/options-swift.struct/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Constants

- [NSRegularExpression.MatchingFlags](foundation/nsregularexpression/matchingflags.md)
- [NSRegularExpression.MatchingOptions](foundation/nsregularexpression/matchingoptions.md)
