---
title: "wordBoundaryKind(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/regex/wordboundarykind(_:)"
---

# wordBoundaryKind(_:)

Returns a regular expression that uses the specified word boundary algorithm.

## Declaration

```swift
func wordBoundaryKind(_ wordBoundaryKind: RegexWordBoundaryKind) -> Regex<Regex<Output>.RegexOutput>
```

## Parameters

- `wordBoundaryKind`: The algorithm to use for determining word boundaries.

## Return Value

Return Value The modified regular expression.
