---
title: options
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsregularexpression/options-swift.property
---

# options

Returns the options used when the regular expression option was created.

## Declaration

```swift
var options: NSRegularExpression.Options { get }
```

## Discussion

Discussion The options property specifies aspects of the regular expression matching that are always used when matching the regular expression. For example, if the expression is case sensitive, allows comments, ignores metacharacters, etc. See NSRegularExpression.Options for a complete discussion of the possible constants and their meanings.

## See Also

### Related Documentation

- [init(pattern:options:)](foundation/nsregularexpression/init(pattern:options:).md)

### Getting the Regular Expression and Options

- [pattern](foundation/nsregularexpression/pattern.md)
- [numberOfCaptureGroups](foundation/nsregularexpression/numberofcapturegroups.md)
