You can get a (slighty out of date) regina rexx manual from http://sites.netscape.net/ssatguru, this has HTML and compiled Windows Help formats for download.
Parsing is another of rexx's complex areas, a subset of its syntax is summarised here:
PARSE [UPPER] LINEIN [template]
PARSE [UPPER] NUMERIC template
PARSE [UPPER] VAR symbol template
PARSE [UPPER] VALUE expression WITH template
template -> [firstPosition] assignments [assignments]
assignments -> [nextPosition] varlist [stopPosition]
varlist -> varname ' ' [varlist]
varname -> "non-constant symbol"
| '.'
firstPosition -> position
nextPosition -> position [nextPosition]
stopPosition -> position
position -> searchPosition
| absPosition
| relPosition
| '(' "expression" ')'
searchPosition -> "string constant"
absPosition -> "integer"
| '=' numexpr
relPosition -> '+' numexpr
| '-' numexpr
numexpr -> "integer"
| '(' "integer expression" ')'
This is an example of extracting each directory (one at a time) from the path (located in DOS or OS/2 environment):
;--- Get "PATH" from environment
#evaluate ^^ ^_Path = GetEnv('PATH')^
;--- Start list -----------------
<P>The path is:
<OL>
;--- List Components ------------
#{
;--- Get next directory name -
#evaluate ^^ ^parse var _Path _ThisBit ';' _Path^
;--- Exit if at end of path --
#if _ThisBit = '' & _Path=''
#break
#endif
;--- Output directory name ---
<LI><??_ThisBit>
#}
;--- End list -------------------
</OL>