<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/RegexBuilder/Anchor/inverted",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "RegexBuilder"
    ],
    "preciseIdentifier" : "s:12RegexBuilder6AnchorV8invertedACvp"
  },
  "title" : "inverted"
}
-->

# inverted

The inverse of this anchor, which matches at every position that this
anchor does not.

```
var inverted: Anchor { get }
```

## Discussion

For the [`wordBoundary`](/documentation/RegexBuilder/Anchor/wordBoundary) and [`textSegmentBoundary`](/documentation/RegexBuilder/Anchor/textSegmentBoundary) anchors, the inverted
version corresponds to `\B` and `\Y`, respectively.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)