---
title: "extractValues(as:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/anyregexoutput/extractvalues(as:)"
---

# extractValues(as:)

Returns strongly-typed match output by converting this type-erased output to the specified type, if possible.

## Declaration

```swift
func extractValues<Output>(as outputType: Output.Type = Output.self) -> Output?
```

## Parameters

- `outputType`: The expected output type.

## Return Value

Return Value The output, if the underlying value can be converted to outputType; otherwise, nil.
