How to Check for Numeric Values in Ruleset

How to Check for Numeric Values in Ruleset using Regex


Real-Life Mapping Scenario

In our scenario we need to test an inbound XML element to determine if the value is number or alpha. In EBI there is no TRUE conditional rule that will allow us to test for numeric.

In our example below, we will use the following to test for number

  • Match Conditional Rule
  • Regex Syntax

Ruleset Set-up for Numeric Testing

In our ruleset we set-up a Composite Rule and apply the Match Rule Condition.

EXTOL Business Integrator Match Rule Condition

In the Match Condition we will test for the Regex syntax of ^\d+$

If the 'test' is met then the input value is NUMERIC and we will execute the rules within the Composite Rule.

EXTOL Business Integrator Match Rule Condition Input


By: on
load('http://www.extol.com/extolnews.rss'); $feed = array(); foreach ($rss->getElementsByTagName('item') as $node) { $item = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue, ); array_push($feed, $item); } $limit = 4; echo ' A free web counter provided by GoStats.