9!:14''
j602/2008-03-03/16:45

rxmatches does not provide all matches.

  require'regex'
   '(1x)|(_1)' rxmatches '_1x'
 0 2
_1 0
 0 2
   '(1x)' rxmatches '_1x'
1 2
1 2

If matches would overlap, some of them are not considered.

This nonoverlapping behavior might be desirable in
some cases but winds up being a problem in other
cases. (Specifically, this breaks an implementation
of http://rosettacode.org/wiki/Markov_Algorithm)

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

Reply via email to