Find URI in text: Difference between revisions

m
→‎{{header|REXX}}: spelled out the word "hierarchical".
m (→‎{{header|REXX}}: used a template for the output section, added/changed whitespace and comments,)
m (→‎{{header|REXX}}: spelled out the word "hierarchical".)
Line 657:
#= 0 /*the count of URI's found (so far).*/
/*▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄*/
do while $\=''; y= pos(':', $) /*locate a colon (:) in the text body.$*/
if y==0 then leave /*Was a colon found? Nope, we're done.*/
if y==1 then do; parse var $ . $ /*handle a bare colon by itself. */
Line 667:
if se\==0 then sr= left(sr, se - 1) /*possibly "crop" the scheme name. */
s= reverse(sr) /*reverse it again to rectify the name.*/
he= verify($, @reserved) /*locate the end of the hierarchical hier─partpart. */
s= s':'left($, he - 1) /*extract and append the hier─part. " " */
$= substr($, he) /*assign an adjusted new part of text. */
#= # + 1 /*bump the URI counter. */