AnsweredAssumed Answered

how can I get only number from input in boomi operation with Map ?

Question asked by NoneNone6341 on Mar 1, 2013
Latest reply on Mar 2, 2013 by ted.sager
Hi,

    How can I get only number from Input from Map function ?
    For the accomplish these I have tried with Custom Javascript function like below.

//////////////////////////////////////////////////////////////////////////////////////////////////
function get_numbers(number) {
    return number.replace(/[^0-9\.]+/g,'');
}

if(input1.toString() != null || input1.toString() != ''){
  output1 = get_numbers(input1.toString());
  if(output1 == null) output1 = '';
}
//////////////////////////////////////////////////////////////////////////////////////////////////

but it gives and error like NumberException, Does RegularExpression work for Boomi Javascript ? ,Please help.

Thanks.

Outcomes