---
schema_version: "1"
id: 174bca89b270532b03293f26d0dad06959ebf87dfd3e4fc41fa7e983feb5011e
title: isNumeric
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-strings-functions-isnumeric.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-strings-functions-isnumeric
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 7ae905b33237e92b3c5b3e5a4f3d3c73314c9f034c81065ec1e2c8c1c2c1e450
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# isNumeric

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

## isNumeric(text: String): Boolean

Checks if the `text` contains only Unicode digits.

A decimal point is not a Unicode digit and returns false. Note that the method does not allow for a
leading sign, either positive or negative.

_Introduced in DataWeave version 2.2.0._

### Parameters

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><code>text</code></p></td><td><p>The input string.</p></td></tr></tbody></table>

### Example

This example shows how `isNumeric` behaves with different inputs and sizes.

#### Source

```DataWeave
%dw 2.0
import isNumeric from dw::core::Strings
output application/json
---
{
  "a": isNumeric(null),
  "b": isNumeric(""),
  "c": isNumeric("  "),
  "d": isNumeric("123"),
  "e": isNumeric("१२३"),
  "f": isNumeric("12 3"),
  "g": isNumeric("ab2c"),
  "h": isNumeric("12-3"),
  "i": isNumeric("12.3"),
  "j": isNumeric("-123"),
  "k": isNumeric("+123")
}
```

#### Output

```JSON
{
  "a": false,
  "b": false,
  "c": false,
  "d": true,
  "e": true,
  "f": false,
  "g": false,
  "h": false,
  "i": false,
  "j": false,
  "k": false
}
```

## isNumeric(text: Null): Boolean

Helper function that enables `isNumeric` to work with a `null` value.

_Introduced in DataWeave version 2.2.0._
