It is currently March 28th, 2024, 8:41 am



Post new topic Reply to topic  [ 1106 posts ]  Go to page Previous  1 ... 33, 34, 35, 36, 37, 38, 39 ... 74  Next
Author Message
 Post subject: Re: Forum replacements problems.
PostPosted: March 23rd, 2017, 12:07 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Hey Freddy I need another help from you since it it to complicated for me :

Before
Code:
[center][b][size=3][color=lightseagreen]The title of the subject that will differ[/color][/b][/size]


After
Code:
<subject>The title of the subject that will differ</subject>
[center][b][size=3][color=lightseagreen]The title of the subject that will differ[/color][/b][/size]


I don't even know if it's possible but I belive in your regex skills :)

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: March 23rd, 2017, 12:49 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
The <subject> element can only be used in .txt file and is parsed when loading posts from .txt file.

It won't work if you add it via replacement when it's being posted. It will just get posted in forum with that line as message text.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: March 23rd, 2017, 1:44 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Yeah I know but I need that for something else:
I have posts from ThemaManager with weird titles and I wan't them to be posted on different forum but when I'm saving them I don't have desirable name, so I thought I will first delete <subject> tag from those posts using regex and then I'll create my own <subject> from the title I posted above and then drop those to ThemaPoster and use my new name.

I hope I've explained myself well

btw Those regex replacments will be done in ThemaLeecher


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: March 23rd, 2017, 8:11 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
Search for:
Code:
\[center\]\[b\]\[size=3\]\[color=lightseagreen\](.+?)\[/color\]\[/b\]\[/size\]


Replace with:
Code:
<subject>$1</subject>\n$0


Enable regex search.

You can use themaLeecher forum next time: http://leecher.freddy.lt/forum/viewtopic.php?f=4&t=5860

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: March 23rd, 2017, 8:51 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Thank You Freddy, I rly appreciate it


Top
 Profile  
Reply with quote  
 Post subject: Image links modification.
PostPosted: April 1st, 2017, 10:12 am 

Joined: November 18th, 2011, 8:46 pm
Posts: 41
Dear Freddy,

How can i change this automatically on themaposter? i cant change manually for only one forum. so i need to understand how i can apply replace codes for this change.

Original version:
Code:
[url=http://imagetwist.com/j4461gbvvyrc/1E3B27E.jpg][img]http://img162.imagetwist.com/th/14853/j4461gbvvyrc.jpg[/img][/url]


i want to post only this part for the pictures. how can i get only this part.

Code:
[img]http://img162.imagetwist.com/th/14853/j4461gbvvyrc.jpg[/img]


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: April 1st, 2017, 9:30 pm 

Joined: March 14th, 2017, 10:19 pm
Posts: 21
Hi, freddy.
Can you make this

Code:
[url=http://imagetwist.com/uo28dmcrlrfu/kittens_thesauceftw_vid_01.jpeg][img]http://img66.imagetwist.com/th/14792/uo28dmcrlrfu.jpg[/img][/url]


look like this?

Code:
[img]http://imagetwist.com/uo28dmcrlrfu/kittens_thesauceftw_vid_01.jpeg[/img]

thx!

EDIT:
Already figured it out!
Leaving the answer if anyone needs it in the future

Search for:
Code:
\[URL=(.+?)\].+?\[/URL\]


Replace with:
Code:
[img]$1[/img]


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: April 2nd, 2017, 5:26 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
"URL" should be lowercase if it's lowercase in the message, otherwise it won't work.

That replacement will also affect all links in that format (even not imagetwist).

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Image links modification.
PostPosted: April 2nd, 2017, 5:59 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
@bestfreeclip

You would need to add replacement:

Search for:
Code:
\[url=.+?\](\[img\].+?\[/img\])\[/url\]


Replace with:
Code:
$1


Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: April 13th, 2017, 10:03 pm 

Joined: March 14th, 2017, 10:19 pm
Posts: 21
Wondering if this can be done with regex

I have this:

Code:
[URL=http://imagetwist.com/d6a2d645cp0e/puddens_359mb_856x480_15.51.jpeg][IMG]http://img162.imagetwist.com/th/15120/d6a2d645cp0e.jpg[/IMG][/URL]
[URL=http://imagetwist.com/mzttacgvxboj/puddens_359mb_856x480_15.51__2_.jpeg][IMG]http://img162.imagetwist.com/th/15120/mzttacgvxboj.jpg[/IMG][/URL]

[img]http://i.imgur.com/27fQZF4.png[/img]
[size="10"][b]Size[/b]: SIZE ||  [b]Quality[/b]: QUAL
[b]Time[/b]: TIME || [b]Format[/b]: FORMAT[/size]

[img]http://i.imgur.com/DoQOhI5.png[/img]
[url=http://k2s.cc/file/54c8cee388a5c/puddens_359mb_856x480_15.51.mp4]

[img]https://i.imgur.com/HTu8whp.png[/img]
LINK2

[img]http://i.imgur.com/ijd57dI.png[/img]
LINK3


& i want regex to copy the size, resolution, time and format from the link url
Code:
puddens_359mb_856x480_15.51.mp4

and replace it with SIZE, QUAL, TIME, FORMAT

example:

Code:
[URL=http://imagetwist.com/d6a2d645cp0e/puddens_359mb_856x480_15.51.jpeg][IMG]http://img162.imagetwist.com/th/15120/d6a2d645cp0e.jpg[/IMG][/URL]
[URL=http://imagetwist.com/mzttacgvxboj/puddens_359mb_856x480_15.51__2_.jpeg][IMG]http://img162.imagetwist.com/th/15120/mzttacgvxboj.jpg[/IMG][/URL]

[img]http://i.imgur.com/27fQZF4.png[/img]
[size="10"][b]Size[/b]: 359mb ||  [b]Quality[/b]: 856x480
[b]Time[/b]: 00:15:51 || [b]Format[/b]: mp4[/size]

[img]http://i.imgur.com/DoQOhI5.png[/img]
[url=http://k2s.cc/file/54c8cee388a5c/puddens_359mb_856x480_15.51.mp4]

[img]https://i.imgur.com/HTu8whp.png[/img]
LINK2

[img]http://i.imgur.com/ijd57dI.png[/img]
LINK3


Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: April 16th, 2017, 6:18 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
Search for:
Code:
\[size=\"10\"]\[b]Size\[/b]: SIZE \|\|  \[b]Quality\[/b]: QUAL\s*\[b]Time\[/b]: TIME \|\| \[b]Format\[/b]: FORMAT\[/size](\s*.+\n\[url=http://k2s.+?([0-9]+mb)_([0-9]+x[0-9]+)_([0-9]+\.[0-9]+)\.(.+?)\])


Replace with:
Code:
[size="10"][b]Size[/b]: $2 ||  [b]Quality[/b]: $3 [b]Time[/b]: $4 || [b]Format[/b]: $5 [/size]$1


Enable regex search.

But the structure should be the same.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: June 4th, 2017, 4:30 am 

Joined: September 21st, 2011, 1:04 pm
Posts: 139
Example Before:
Code:
[url=https://music.israbox.com/engine/go.php?url=aHR0cDovL3R1cmJvYml0Lm5ldC82dWFqMGY2anJ1dWkuaHRtbA%3D%3D][b]2017 - Race To Zero FLAC.rar[/b][/url]

After:
Code:
https://music.israbox.com/engine/go.php?url=aHR0cDovL3R1cmJvYml0Lm5ldC82dWFqMGY2anJ1dWkuaHRtbA%3D%3D


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: June 11th, 2017, 6:18 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12629
Location: Earth
Search for:
Code:
\[url=(https://music\.israbox.+?)\].+?\[/url\]


Replace with:
Code:
$1


Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: June 13th, 2017, 2:33 pm 

Joined: May 7th, 2012, 11:26 am
Posts: 48
Hello Freddy,

How to delete all content in text file AFTER some string, including that string as well?
And similar but I think harder, how to delete all content in text file BEFORE some string, including that string as well?

For example,
Before:
Code:
Some content 1 which is unimportant
.
.
.
string1
Some content 2 which is important to stay
.
.
.
string2
Some content 3 which is unimportant
.
.
.


After:
Code:
Some content 2 which is important to stay
.
.
.

_________________
You may visit PornBlog.Biz if you like


Top
 Profile  
Reply with quote  
 Post subject: Re: Forum replacements problems.
PostPosted: June 13th, 2017, 2:39 pm 

Joined: May 7th, 2012, 11:26 am
Posts: 48
And one more question,

Is it possible to find string1 and replace it with string2?

For example,
Before:
Code:
Some content
.
.
.
string1
.
.
.
Sometext1: string2

After:
Code:
Some content
.
.
.
string2
.
.
.
Sometext1:

_________________
You may visit PornBlog.Biz if you like


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1106 posts ]  Go to page Previous  1 ... 33, 34, 35, 36, 37, 38, 39 ... 74  Next

Who is online

Users browsing this forum: No registered users and 10 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