repo.or.cz
/
sunny256-utils.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Upgrade yt-dlp to version 2022.11.11
[sunny256-utils.git]
/
xmlstrip
blob
3b53774da93c8c8bbf73ab7715b04bead0699cad
1
#!/usr/bin/env perl
2
3
# xmlstrip
4
# File ID: 06bf7352-5d4a-11df-b044-90e6ba3022ac
5
# Remove everything inside and outside XML elements, in other words,
6
# clean up the bastard.
7
8
use
warnings
;
9
10
my
$Data
=
join
(
""
, <>);
11
$Data
=~
s/>[^<>]+?</></gs
;
12
$Data
=~
s/\s*\n\s*[^\S\$]/ /gs
;
13
print
(
$Data
);