Hello

I accidentally have found a bug in rxapply, which actually resides in
rxfrom.

Have a look at a simple demonstration of the bug:

   'a' |. rxapply 'A'

|length error: rxfrom

| r=.u&.>mat rxfrom y


I think that is a bug. It should return the original string if nothing is
to be matched and applied.


If you open up the regex.ijs and find up the definition of rxfrom, you can
see a commented out definition of rxfrom which is different from the
current one. If you use that instead,


   rxfrom=: <@({~ (+ i.)/)"1~

'a' |. rxapply 'A'

A
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to