public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 295e1d9dd363875589b69c07e9abd64e905749c1 450 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
use strict;

my $str = '';
my $regex = qr/(<[^\/].*?>.*?<\/.*?>\n?)|(<\/div>)|(<\/p>)/msp;
my $subst = '';


local $/=undef;
open FILE, '<', 'README.md' or die "Can't open file $!";
my $file_content = <FILE>;
close FILE;
#print "Source: $file_content\n";
my $result = $file_content =~ s/$regex//rg;

my $regex2 = qr/\n[ \n]{3,}\n/msp;
$result = $result =~ s/$regex2/\n\n/rg;

#print "The result of the substitution is: $result\n";
print "$result\n";

debug log:

solving 295e1d9 ...
found 295e1d9 in https://passt.top/passt

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).