
Support for regular expressions in APL?
Regular expressions already exist in the ss (string search and replace)
function in the xutils auxiliary processor in Dyalog APL, and has always
done so, even in their versions for the PC.
Quote:
>I have been experimenting with the Perl language recently and
>have found its regular expression syntax to be quite powerful and
>useful. It seems to me that it would be useful to extend APL to
>support a version of regular expressions, perhaps as an extension
>to the "find" function. It could be initially implemented as an
>auxiliary processor for experimentation.
>Given the generalized array features of second generation APLs
>it should be simple to apply regular expressions to numeric data
>as well as characters, e.g. '[' 12.3 '-' 100.5 ']+' would match
>any sequence of one or more numbers x for which
>12.3 <= x <= 100.5. Defining the result to be similar to that for
>"find" would allow this feature to be applied to arrays of
>arbitrary rank.
>Another possibility would be to have the regular expression handler
>take a two-element left argument, one of which was the regular
>expression itself, the other being a character representation of an
>APL expression to be applied to all matching sections of an array.
>That would be an interesting and powerful control structure.
>--- Brian
John Sullivan
-------------
Die dulci fruimini, o vos omnes!
remove the dots from the first three (Welsh) words for my real address