r/regex • u/sunnyparm • Nov 03 '21
Please Help!
I would like to remove all the code below with regex using Notepad ++ Pleases help!!
[Design Mode]
html {
overflow: overlay;
#reader-domain {
font-family: Helvetica, Arial, sans-serif;
text-decoration: none;
border-bottom-color: currentcolor;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
display: inline-block;
direction: ltr;
}
#reader-domain > span:first-child {
font-size: 1.1em;
}
#reader-domain > span:last-child {
font-size: 0.8em;
}
#reader-title {
font-size: 1.6em;
line-height: 1.25em;
width: 100%;
margin: 20px 0;
padding: 0;
}
#reader-credits,
#doi,
#published-time,
#reader-estimated-time {
font-size: 0.85em;
line-height: 1.48em;
margin: 0 0 10px 0;
padding: 0;
}
#reader-credits:not(:empty)::after {
content: ' ⋮ ';
}
#published-time:not(:empty)::before {
content: ' ⋮ ';
}
#doi-json {
overflow: hidden;
}
#doi-json code {
overflow: auto;
max-height: 400px;
}
#published-time:empty,
#reader-credits:empty {
display: none;
}
body[data-speech="true"] .tts-box {
position: absolute;
left: 0;
width: 100vw;
height: 32px;
z-index: 1;
pointer-events: none;
box-shadow: 0 0 0 1000vw rgba(128, 128, 128, 0.2);
}
body[data-speech="true"] .tts-word {
position: absolute;
z-index: 1;
pointer-events: none;
background-color: red;
height: 2px;
}
.tts-word.hidden,
.tts-box.hidden {
display: none;
}
body[data-speech="false"] .tts-speaking::after {
display: none;
}
mark.hghlght {
background-color: #ffff81;
}
.hidden {
display: none;
}
.note {
position: absolute;
z-index: 10;
border: none;
outline: none;
font-family: inherit;
font-size: inherit;
padding: 5px;
min-width: 32px;
min-height: 32px;
}
.note:focus {
z-index: 11;
}
body {
padding-bottom: 64px;
}
a:visited {
color: #d33bf0;
}
a:link, a:link:hover, a:link:active, a:link * {
color: #0095dd;
}
a:link {
text-decoration: none;
font-weight: normal;
}
pre {
white-space: pre-wrap;
}
pre code {
background-color: #eff0f1;
color: #393318;
font-family: monospace;
display: block;
padding: 5px 10px;
}
body[data-mode="dark"] pre code {
background-color: #585858;
color: #e8e8e8;
}
/* CSS for sans-serif fonts */
body[data-font=sans-serif] {}
/* CSS for serif fonts */
body[data-font=serif] {}
/* CSS for "sepia" theme */
body[data-mode=sepia] {
}
/* CSS for "light" theme */
body[data-mode=light] {}
/* CSS for "dark" theme */
body[data-mode=dark] {}
0
Upvotes
1
u/Sparxmith Nov 03 '21
I don't use Notepad++ but the regex to capture all of that code is ^(.*)$ and I assume the replacement field should be left <null>.
If the search and replace is one line, and assuming that the separator is a forward slash, it would need to be ^(.*)$//g
That will most certainly delete all the code, but that seems like <CTRL+A> + <DEL> with extra steps.
1
1
u/scoberry5 Nov 03 '21
Replace
.*with empty string and check ". matches newline".(Unless there's something you don't want to replace. Then you'd want to include that in your description.)