starting number is 100 & ending number is 200, I need all numbers that contains 5
Discussion posts and replies are publicly visible
a!forEach( items: enumerate(100)+100, expression: if( like(fv!item,"*5*"), fv!item, {} ) )
Or, without abusing that foreach ;-)
filter( like(_, "*5*"), enumerate(100)+100 )
Hi, one more way to do this....
/*rule will return -1 if it does not find any number ending with 5*/ a!localVariables( local!start:100, local!end: 200, wherecontains( 5, tointeger( apply( fn!cleanwith, enumerate(local!end - local!start), 5 ) ) ) - 1 + local!start )