---
title: allowCommentsAndWhitespace
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsregularexpression/options-swift.struct/allowcommentsandwhitespace
---

# allowCommentsAndWhitespace

Ignore whitespace and #-prefixed comments in the pattern.

## Declaration

```swift
static var allowCommentsAndWhitespace: NSRegularExpression.Options { get }
```

## See Also

### Constants

- [caseInsensitive](foundation/nsregularexpression/options-swift.struct/caseinsensitive.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)
