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

# 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._
