Anonymous user
Find URI in text: Difference between revisions
m
→{{header|REXX}}: used a template for the output section, added/changed whitespace and comments,
m (added whitespace to the task's preamble, added a ;Task:, added whitespace before the TOC.) |
m (→{{header|REXX}}: used a template for the output section, added/changed whitespace and comments,) |
||
Line 637:
=={{header|REXX}}==
<lang rexx>/*REXX program scans a text (contained within the REXX
@abc= 'abcdefghijklmnopqrstuvwxyz'
@abcU= @abc; upper @abcU; @abcs= @abc || @abcU /* " lower & uppercase " */
@
@unreserved= @abcs || 0123456789 || '-._~' /* " " " " " " */
@reserved= @unreserved"/?#[]@!$&)(*+,;=\'" /*add other punctuation & special chars*/
#= 0 /*
/*▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄*/
if y==0 then leave /*
if y==1 then do; parse var $ .
sr= reverse( left($, y - 1)
!.#=
/*▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀*/
do k=1 for #; say !.k; end /*stick a fork in it, we're all done.
{{out|output|text= when using the internal default inputs:}}
<pre>
stop:
|