Find URI in text: Difference between revisions
→{{header|Perl 6}}: Update to current code
(Added Kotlin) |
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Update to current code) |
||
Line 336:
=={{header|Perl 6}}==
This needs an installed URI distribution. {{works with|Rakudo|2018.03}}
<lang perl6>use v6;
use IETF::RFC_Grammar::URI;
say q:to/EOF/.match(/ <IETF::RFC_Grammar::URI::
this URI contains an illegal character, parentheses and a misplaced full stop:
http://en.wikipedia.org/wiki/Erich_Kästner_(camera_designer). (which is handled by http://mediawiki.org/).
Line 352:
EOF
say $/[*-1];
say "We matched $/[*-1], which is a $/[*-1].^name() at position $/[*-1].from() to $/[*-1].to()"
</lang>
|