It is currently December 4th, 2024, 8:20 am



Post new topic Reply to topic  [ 285 posts ]  Go to page 1, 2, 3, 4, 5 ... 19  Next
Author Message
 Post subject: Replacements help topic.
PostPosted: October 11th, 2013, 1:25 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
Ask any questions about replacements here.

Please post the message text of how you want it to look before and after within code tags.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: November 11th, 2013, 7:25 am 

Joined: March 12th, 2013, 5:39 pm
Posts: 3
i want to replace [url = http :// something . com ]text [ /url ] with http://something.com
how to do that ??

----

also i want to put [ code ] in between imdb link
how to do that


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: November 11th, 2013, 7:27 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
Search string:
Code:
\[url=(http://[^\]]+?)\](.*?)\[/url\]

Replace with:
Code:
$1

Enable regex search.

Search string:
Code:
(?i)http://(www\.)?imdb[^>\]'"\s]+

Replace with:
Code:
[code]$0[/code]

Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 4th, 2014, 8:22 pm 

Joined: April 12th, 2013, 4:57 pm
Posts: 33
There are many sites which have something like this at the end how to remove or replace it with nothing

The post [ url= http:// www. yoursite . com/ post source] Topic Title [/ url ] appeared first on [url= http :// sitename . com]Site Name[ /url ].


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 6th, 2014, 12:41 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
If that's the last line and it always appear in that website, then just do this: in "WEBSITES" -> "Select that website's page which was added" -> in "Other" tab -> There is a setting to remove last line.

All new leeched message won't have that last line. You could re-leech the existing to quickly remove it as well (Just select all those message and click the re-leech button above the message list).

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 20th, 2014, 12:14 am 

Joined: September 19th, 2011, 12:30 am
Posts: 275
Hello Freddy,

I need help for some regex.

Before :
Code:
1,2/5 (543)
2,7/5 (1694)
3,6/5 (73)


After :
Code:
1,2/5
2,7/5
3,6/5



Before :
Code:
[b]Taille des fichiers : [/b]1000 Mo + 860 Mo
1000 Mo + 860 Mo


After :
Code:
Taille des fichiers :  x 900 Mo + (1 x  Mo)
 x 900 Mo + (1 x Mo)



Before :
Code:
[b]Nombre de fichiers : [/b]5 Fichiers
[b]Nombre de fichiers :[/b]12 Fichiers


After :
Code:
[b]Nombre de fichiers :[/b] 5
[b]Nombre de fichiers :[/b] 12


Before :
Code:
Machete.Kills.2013.FRENCH.720p.BluRay.x264-CARPEDIEM ( 4860 Mo)


After :
Code:
[b][u]Nom de la release :[/u][/b] [color=red][b]Machete.Kills.2013.FRENCH.720p.BluRay.x264-CARPEDIEM[/b][/color]


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 23rd, 2014, 7:45 am 

Joined: August 27th, 2013, 6:54 pm
Posts: 186
how to change these:
xyz.com.hello.the.world.here.we.go.HTML5-XYZ

to

Hello the world here We go HTML5


ALL_SUB_DES_V4.0.3-Xxs

to

All sub des v4.0.3


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: February 18th, 2014, 10:22 am 

Joined: September 15th, 2011, 12:04 am
Posts: 38
Does themaleecher's regex support multiple lines of text?

I was hoping you could also include regex options to use like ms word pattern, perl style pattern, unicode pattern and easypattern.


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: February 23rd, 2014, 7:50 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
techdaemon wrote:
Does themaleecher's regex support multiple lines of text?

I was hoping you could also include regex options to use like ms word pattern, perl style pattern, unicode pattern and easypattern.


Yes, it does support multiline and pretty much everything what regex can support. Check the JAVA regex in google for detailed information. You can add (?s) or (?m) at the start.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 6:34 pm 

Joined: June 27th, 2013, 6:52 pm
Posts: 58
Freddy wrote:
Search string:
Code:
\[url=(http://[^\]]+?)\](.*?)\[/url\]

Replace with:
Code:
$1

Enable regex search.


When the line you want to replace is two lines, like this example i have here, when the [/url] is on the next line, the replacement thing do not work. How do I do to make it work?
Code:
[url=http://svscomics.com/adult_comics/176878-art-by-glassfish.html][b]Art by Glassfish[/b]
[/url]


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 6:41 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
Update the old to:

Search string:
Code:
(?s)\[(url)=(http://[^\]]+?)\](.*?)\[/\1\]


Replace with:
Code:
$2

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 6:58 pm 

Joined: June 27th, 2013, 6:52 pm
Posts: 58
Freddy wrote:
Update the old to:

Search string:
Code:
(?s)\[(url)=(http://[^\]]+?)\](.*?)\[/\1\]


Replace with:
Code:
$2


Oh, sorry I just saw that the one i quoted was a little dfferent from what I read on the FAQ :P

It is this i mean i wanted to do

Code:
5. You could extract the text from [url=http://something.com]text[/url] like this
Search string: (?i)\[url=http://[^\]]+?](.*?)\[/url\]
Replace with: $1
Enable the "regex search" checkbox.

All the [url=http://something.com]text[/url], would be replaced to just "text".


Tried to just changed it to $2 with that search string but did not work :/


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 7:00 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12967
Location: Earth
Edit: sorry, that one in FAQ is different a lot, but it only will work without new lines.

Use this:

Search string:
Code:
(?is)\[(url)=http://[^\]]+?](.*?)\[/\1\]


Replace with:
Code:
$2

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 7:08 pm 

Joined: June 27th, 2013, 6:52 pm
Posts: 58
Thanks, now it works :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: March 26th, 2014, 7:51 pm 

Joined: June 27th, 2013, 6:52 pm
Posts: 58
Well, this was annoying :P
When i wanted to delete all svscomics links in the leeched post i did not think about the downoad links that I wante to keep, so that search string repacement thing deleted all links, including download links xD

Is it possible to delete all links to a certain site instead of all links?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 285 posts ]  Go to page 1, 2, 3, 4, 5 ... 19  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC