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
/
color:\s*#\w+|pid=\d+#\w+|(#\w+)
/
gm
Input 1
1
New
<span style="font-weight: bold;">test1<span style="color: #FFA500;">test2</span>test3</span>#hello#how#are#you <span style="font-weight: bold;">test1<span style="color: #FFA500;">test2</span>test3</span>#lalala #hello <div class="post_body" id="pid_58705"> <blockquote><cite><span> (Hoy 02:42)</span>Moroha escribió: <a class="quick_jump" href="http://test.com/Thread-hello?pid=58672#pid58672" rel="nofollow"> </a></cite>testing</blockquote></div> pid=97589735935795358672#foobar <span style='color: #FFAABB'><a href='?pid=55155#pid55155'>hey #hello</a></span>
Extraction
<span style="font-weight: bold;">test1<span style="color: #FFA500;">test2</span>test3</span>#hello#how#are#you <span style="font-weight: bold;">test1<span style="color: #FFA500;">test2</span>test3</span>#lalala #hello <div class="post_body" id="pid_58705"> <blockquote><cite><span> (Hoy 02:42)</span>Moroha escribió: <a class="quick_jump" href="http://test.com/Thread-hello?pid=58672#pid58672" rel="nofollow"> </a></cite>testing</blockquote></div> pid=97589735935795358672#foobar <span style='color: #FFAABB'><a href='?pid=55155#pid55155'>hey #hello</a></span>