Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<code1>class="relativetime">)(?<code2>.+)(?<code3><\/span>)
/
g
Input 1
<!DOCTYPE html> <html> <head> <title>Newest Questions - Page 44 - Electrical Engineering Stack Exchange</title> <link rel="shortcut icon" href="//cdn.sstatic.net/electronics/img/favicon.ico"> <link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/electronics/img/apple-touch-icon.png"> <link rel="search" type="application/opensearchdescription+xml" title="Electrical Engineering Stack Exchange" href="/opensearch.xml"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="//cdn.sstatic.net/js/stub.js?v=5d233283ca8d"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/electronics/all.css?v=672ddec9ce04"> <script type="text/x-mathjax-config"> MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50
Substitution
<!DOCTYPE html> <html> <head> <title>Newest Questions - Page 44 - Electrical Engineering Stack Exchange</title> <link rel="shortcut icon" href="//cdn.sstatic.net/electronics/img/favicon.ico"> <link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/electronics/img/apple-touch-icon.png"> <link rel="search" type="application/opensearchdescription+xml" title="Electrical Engineering Stack Exchange" href="/opensearch.xml"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="//cdn.sstatic.net/js/stub.js?v=5d233283ca8d"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/electronics/all.css?v=672ddec9ce04"> <script type="text/x-mathjax-config"> MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50