Thread View: bit.listserv.rexxlist
1 messages
1 total messages
Started by Otto Stolz +49 7531 88 2645
Tue, 16 Jun 1992 08:55
re: Pattern matching
Author: Otto Stolz +49 7531 88 2645
Date: Tue, 16 Jun 1992 08:55
Date: Tue, 16 Jun 1992 08:55
36 lines
2238 bytes
2238 bytes
Hi Greg,
yesterday, I've sent you my MATCH EXEC, an external procedure to match
single-word, all-uppercase, patterns, which you have already received.
This morning, I've sent you copies of two old pertinent REXXLIST con-
tributions; one of them contains a MATCH variant to be used as a local
procedure. Enjoy!
As you wanted to parse multi-word, mixed-case, patterns, you will have to
adapt the routines, suitably. The uppercasing, and the selection of one
word each of the arguments are handled by the two parse statements in
lines 36 and 37 of the EXEC file.
Hi gang,
as usual, I offer the routines to all of you for the asking. They are
suited for all REXX dialects (in the external procedure, you will have
to replace CMS's XMITMSG command with your system's error message
generator (or a REXX say instruction). I'll append a few comment lines
from the EXEC for you to assess it.
There is also a German version available, named PASST.
Happy programming,
Otto Stolz <RZOTTO@DKNKURZ1.Bitnet>
<RZOTTO@nyx.uni-konstanz.de>
--------
/* MATCH EXEC Determines whether pattern matches given word. */
/* Example: if ^ match(userid(),"R*") then call diag 8, "LOGOFF" */
/* Result: a Boolean result will be yielded by the function- */
/* invocation, or delivered in REXX variable RESULT: */
/* Pattern: * matches arbitrary strings of arbitrary length; */
/* % matches arbitrary single character; */
/* any other character matches its like. */
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads