I have a verb split:

   split =: <.@%&100 , 100&|
   split 1234
12 34

I want to compare numbers to see if one of their 'split regions' (e.g. 12 or 
34) matches a given number.
So far I have:

   ]g =. 13 :'(f y) = (f"0 x)' 
([: f ]) = [: f"0 [
   1234 5678 g 3456
0 1
1 0

I want to make that actually return the numbers that matched, i.e.

1234
5678

I can't seem to get a working solution for this.

Any help appreciated, thanks.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to