themaManager
http://manager.themasoftware.com/forum/

Removing only uploaded.net links with code surrounding them.
http://manager.themasoftware.com/forum/viewtopic.php?f=4&t=7497
Page 1 of 2

Author:  Rafx [ September 28th, 2022, 3:04 pm ]
Post subject:  Removing only uploaded.net links with code surrounding them.

How to remove links only from uploaded but also with code that surrounds them? For now, I go to post and extract links then on the right from uploaded links I write r, the links are gone but code tag that was surrounding them is still there. Any possibility to delete it as well? Other links like rg or ddownload I want to stay, so I don't want to delete all links in post.

Author:  Freddy [ September 28th, 2022, 3:21 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

You can do it better, but I would need specific examples of what code you have around them and what's left after that regular removal. Make sure the examples are 100% the same as you have in posts (with all new lines).

Author:  Rafx [ September 28th, 2022, 4:16 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

For example, there is something like this:

Code:
<p>
    
</p>

<pre class="ipsCode">
<span><a href="https://ddownload.com/3zkcwexronm0/Age.of.Empires.II.Definitive.Edition.Dawn.of.the.Dukes.Update.Build.56005-CODEX.rar" rel="external nofollow">https://ddownload.com/3zkcwexronm0/Age.of.Empires.II.Definitive.Edition.Dawn.of.the.Dukes.Update.Build.56005-CODEX.rar</a>
</span></pre>

<p>
    
</p>

<pre class="ipsCode">
<span><a href="http://uploaded.net/file/d2ra09c0/Age.of.Empires.II.Definitive.Edition.Dawn.of.the.Dukes.Update.Build.56005-CODEX.rar" rel="external nofollow">http://uploaded.net/file/d2ra09c0/Age.of.Empires.II.Definitive.Edition.Dawn.of.the.Dukes.Update.Build.56005-CODEX.rar</a>
</span></pre>

<p>
    
</p>

<pre class="ipsCode">
<span><a href="https://clicknupload.to/z1hvsxug8kxn" rel="external nofollow">https://clicknupload.to/z1hvsxug8kxn</a>
</span></pre>

<p>
    
</p>


After removing uploaded links with method described above, the code tag is left there.

Author:  Freddy [ September 28th, 2022, 5:49 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Add this replacement for that site (this will basically remove the empty code tags after link is removed):

Search for:
Code:
<pre class=\"ipsCode\">\s*</span></pre>\s*<p>\s*</p>\s?


Replace with:
Code:
(leave empty)


Enable regex search.

Fully tested. It will be fine then.

For faster removing you can temporary disable all other hosts expect uploaded.net -> then only uploaded.net links will be extracted and you can enable in that window option "Remove all links" (you won't need to enter "r" manually then) -> press "Replace links".

uploaded.net links will be removed (as you did before) + the replacement will remove the empty tags (the replacement only removes empty tags, nothing more, if there are no empty tags it won't affect anything).

Author:  Rafx [ September 28th, 2022, 8:54 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Wow, many thanks for that, helps a lot.

Author:  Rafx [ September 29th, 2022, 9:58 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Does not seem to work, checked it on post also and code tags still there:

Image

Author:  Rafx [ September 29th, 2022, 10:08 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Now I see, my mistake, On screen got <span>, that why he did not delete, and sometimes I see there is no <p></p>, so I deleted it.

Would the formula like this be good?

Code:
<pre class=\"ipsCode\">\s*</span></pre>\s*


Or this better?
Code:
<pre class=\"ipsCode\">\s*</span></pre>\s?

Author:  Freddy [ September 30th, 2022, 6:30 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Your testing example is wrong. You have two ending "</span>" tags. When themaManager is removing the link first </span> tag will be removed together with the link.

You probably just removed the <a> tag by hand (this is not how it looks in the forum).

If 100% sure that it's from the forum (not by hand), then that regex won't work at all, you need to add the second </span> tag there for it to work.

Author:  Rafx [ September 30th, 2022, 7:10 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Yes, I changed a little the formula, because in different post the wrong combination looks different.

Code:
<pre class=\"ipsCode\">\s*</pre>\s*


I made such formula for now, and it helped, seems to work ok.

Author:  Rafx [ October 2nd, 2022, 5:07 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

How to match this?

Code:
<p>
    
</p>

<p>
    
</p>

<p>
    
</p>

<p>
    
</p>



From this sample:
Code:
<br/>
   <span style="color:#FF9900;"><strong><span style="font-size:14px;">Download:</span></strong></span>
</p>

<p>
    
</p>

<p>
    
</p>

<p>
    
</p>

<p>
    
</p>

<pre class="ipsCode">

Author:  Freddy [ October 2nd, 2022, 6:19 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Pretty much the same as in previous replacement.

Search for:
Code:
<p>\s*</p>\s*<p>\s*</p>\s*<p>\s*</p>\s*<p>\s*</p>\s*


Replace with:
Code:
(leave empty)


Enable regex search.

Author:  Rafx [ October 2nd, 2022, 8:46 pm ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

I tried that already, but does not work:

Image

Author:  Freddy [ October 3rd, 2022, 5:19 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Your examples above and in your screenshot are different. Above you had four pairs of empty <p> tags. In the screenshot you have only three.

Just remove one pair from the replacement:

Search for:
Code:
<p>\s*</p>\s*<p>\s*</p>\s*<p>\s*</p>\s*


Replace with:
Code:
(leave empty)


Enable regex search.

You can add both replacements for both cases.

Author:  Rafx [ October 3rd, 2022, 6:40 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

Yes I know, but I checked different combinations already, even with 2 <p> tags, and it does not remove them, I don't know why.

Image

Author:  Freddy [ October 3rd, 2022, 7:37 am ]
Post subject:  Re: Removing only uploaded.net links with code surrounding t

You probably have a space at the end in replacement or the text which you pasted there has some invisible characters.

Tested again. It works fine.

Page 1 of 2 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/