wordBoundary
An anchor that matches at a word boundary.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
static var wordBoundary: Anchor { get }
Word boundaries are identified using the Unicode default word boundary algorithm by default. To specify a different word boundary algorithm, use the wordBoundaryKind(_:)
method.
This anchor is equivalent to \b
in regex syntax.