Thanks. That example is mixed up, and should be:
pat=. '([[:alpha:]][[:alnum:]_]*) *=[.;]' NB. subexp is name in assign
]phandle=. rxcomp pat NB. compile
1
str=. '3,foo3=.23,j42=.123,123' NB. a sample string
phandle rxmatches str NB. all matches
2 6
2 4
11 5
11 3
]m=. (phandle;,0) rxmatches str NB. entire matches only
2 6
11 5
m rxcut str NB. return alternating non-match/match boxes
+--+------+---+-----+-------+
|3,|foo3=.|23,|j42=.|123,123|
+--+------+---+-----+-------+
('first';'second') m rxmerge str
3,first23,second123,123
On Tue, May 6, 2014 at 6:25 AM, Raul Miller <[email protected]> wrote:
> That looks wrong -- rxmerge is an adverb. I should be home in about six
> hours, and can go into more detail then if it's still a mystery.
>
> Thanks,
>
> --
> Raul
>
> On Monday, May 5, 2014, greg heil <[email protected]> wrote:
>
> > The examples on the ~regex_verbs page work (in j801) up to the line
> >
> > phandle rxmerge str
> >
> > where a "domain error" occurs. Which is unfortunate as i was trying to
> > figure out rxmerge;-)
> >
> > ---~
> > http://www.jsoftware.com/docs/help602/user/regex_verbs.htm
> >
> > greg
> > ~krsnadas.org
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm