In my j602\help\user\regex_verbs.htm file:

  str=. '3,foo3=.23,j42=.123,123'   NB. a sample string

...

  pat=. '([[:alpha:]][[:alnum:]_]*) *=[.;]'   NB. subexp is name in assign

...

  ]phandle=. rxcomp pat   NB. compile
1

...


  phandle rxmerge str
+------+----+
|foo3=.|foo3|
+------+----+

The result of rxmerge seems to be wrong. Actually, it results in an error.

See the following:

  phandle rxmerge str
|domain error
|       phandle rxmerge str

I think it should have been something like:

table (phandle rxmatches str) rxmerge str

However, I am not sure what "table" should be like, in this case. Say,
I want to change foo3=. into foo3=: and j42=. into j42=: Then how
should I form table? (when the pattern match isn't nested it's easy
though)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to