todouble

Purpose

Сonverts a string value into a number.

Syntax

todouble($group)

Arguments

Requires a single string argument - a named group.

The function cannot accept a constant as an argument.

Returned Value

A numerical value that was obtained by converting the input value to a number.

If the input is not a named group, function does not return any results.

If the input string can not be transformed to a number, the result field is shown as empty.

Examples

Dataset

XPDL rule

Result

I ate 2 pieces of the pie.

rule: r1

{

query: {number()}:1

result: Match = todouble($1)

}

2

I ate 2.5 pieces of the pie.

2.5

I ate 2 pieces of the pie.

rule: r1

{

query: {"pie"}:1

result: Match = todouble($1)

}

“”

I ate 2.5 pieces of the pie.

“”