hi folks,
Is there a way to check for integer values for each value in an array? The array can have text or integer values.
I have already tried using like() but its not accurate as the size of the digits change i.e, double digits or triple digit numbers. Checking with tointeger() also failed as it converted text values into integers and when passed to the group() function it gave me an incorrect result.
TIA!!
Discussion posts and replies are publicly visible
Hi apoorvam
You can use Regex functions to achieve the above.
Thanks!!!
Regards
Hema
hi Hema
Can you help me with an example for integer values in an text array?
Please check the below sample code,
load( local!data: { "1", "Test", "1234", "Test 46 Number" }, a!forEach( items: local!data, expression: regexmatch( "[0-9]$", fv!item ) ) )
Returns true for all the integer values in the array. Hope this helps.