Sublime Forum

Regex - Union Group expressions

#1

hello. I have a problem with a group of expressions. I want to union this expression to work together the same time.

so, I have:

(<dd[\s\S]*?>[\s\S]*?|<dt[\s\S]*?>[\s\S]*?|<dl[\s\S]*?>[\s\S]*?)

and

(<a href[\s\S]*?>[\s\S]*?)|(\b(http|https):\/\/.*[^ alt]\b)|(<img[\s\S]*?>[\s\S]*?)|<!--[\s\S]*?-->[\s\S]*?|<div class[\s\S]*?>[\s\S]*?|<td valign[\s\S]*?>[\s\S]*?|<td[\s\S]*?>[\s\S]*?|<tr[\s\S]*?>[\s\S]*?|</td>|</tr>|<span style="float:right"> IP Logged</span>[\s\S]*?Posted:[\s\S]*?|<table class[\s\S]*?</table>[\s\S]*?|</table>|<a[\s\S]*?</a>[\s\S]*?|<td[\s\S]*?</td>[\s\S]*?|<table[\s\S]*?>[\s\S]*?|<script[\s\S]*?</script>[\s\S]*?|<span[\s\S]*?>[\s\S]*?|<g:plusone[\s\S]*?>[\s\S]*?|<![\s\S]*?>[\s\S]*?|<iframe[\s\S]*?</iframe>[\s\S]*?|<IFRAME[\s\S]*?>[\s\S]*?|<div itemscope[\s\S]*?>[\s\S]*?|<td style[\s\S]*?</td>[\s\S]*?|<i style[\s\S]*?>[\s\S]*?|<b style[\s\S]*?>[\s\S]*?|</fb:like>|<div itemscope[\s\S]*?>[\s\S]*?|<td style[\s\S]*?</td>[\s\S]*?|<blockquote>|</blockquote>|</em>|<em>|</b>|<b>|<div id[\s\S]*?>[\s\S]*?|<strong>|</strong>|<br clear="all"/>|<p class[\s\S]*?>[\s\S]*?|<a>|</a>|<fb[\s\S]*?>[\s\S]*?|<em >|<bdi>|</bdi>|<strong |==|</​code>|<code>|colspan[\s\S]*?>[\s\S]*?|</noscript>|<noscript>|</body>|</html>|<i>|</i>|<fieldset>[\s\S]*?</fieldset>[\s\S]*?|<a|<h4[\s\S]*?h4>[\s\S]*?|<h6[\s\S]*?h6>[\s\S]*?|<h3[\s\S]*?h3>[\s\S]*?

All this piece of regex deletes some html tags.

Anyway, I put the sign " | " between those 2 regex expressions, and doesn’t work. if I use each expression separately, works. But I want them together, because, basically, every expressions contains is the same regex, repetead more time.

0 Likes