It is currently March 28th, 2024, 7:11 pm



Post new topic Reply to topic  [ 283 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 19  Next
Author Message
 Post subject: Re: Replacements help topic.
PostPosted: January 17th, 2018, 8:46 am 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Hey Freddy

I nned your help again

I want to replace everything beetwen those two words xzxzxz and zazaza
to
<imdbInfo>

before
Code:
xzxzxz

[color=green][b]~ Some text ~[/b][/color]






some text

[b]some text:[/b]
zazaza


after
Code:
<imdbInfo>


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 17th, 2018, 9:52 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12630
Location: Earth
Search for:
Code:
(?s)xzxzxz.+?zazaza


Replace with:
Code:
<imdbInfo>


Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 17th, 2018, 7:58 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Thank You Freddy

Take care :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: October 20th, 2018, 8:02 am 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Hey Freddy
Can you help me with this regex:

before:

Code:
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part1.rar
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part2.rar
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part3.rar


after

Code:
SOME TEXT

https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part1.rar
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part2.rar
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.part3.rar


and

Code:
https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.rar


Code:
SOME TEXT

https://1fichier.com/?0q313j6zl22l9mpbpp3vj/The.Spy.Who.Dumped.Me.2018.rar


Is possible to have one or two regex for those two replacements that will not intervene with each other:

Ofc the filenames and numer of links would be different each time.

I hope it can be done.


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: October 21st, 2018, 6:01 am 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12630
Location: Earth
Search for:
Code:
(?is)https?://1fichier.+


Replace with:
Code:
SOME TEXT\n\n$0


Enable regex.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: October 21st, 2018, 7:24 am 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
Great, it's working :)
Thank You


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 4th, 2019, 4:09 pm 

Joined: September 11th, 2011, 6:44 pm
Posts: 57
Hello @Freddy,

Can you please help me to make regrex for this:

From
Code:

[url=https://abc.com/javascript:ShowOrHide('sp40585fec515d14e82151a15d757eda33')]"Logfile"[/url]
[code]
Anything...
[/code]



To

Code:
[spoiler="Logfile"]
Anything...
[/spoiler]



And 1 more:

From

Code:

[code]
Anything....

[url=https://abc.com/javascript:ShowOrHide('sp40585fec515d14e82151a15d757eda33')]"Logfile"[/url]

Anything...
[/code]




To

To

Code:

[code]
Anything....
[/code]

[spoiler="LogFile"]
Anything...
[/spoiler]


_________________
Only4Free® | Media Center Network®


Last edited by mrcas on January 4th, 2019, 6:24 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 4th, 2019, 6:06 pm 

Joined: September 11th, 2011, 6:44 pm
Posts: 57
I tried with this regrex, but it does not work

(.*?)[url=(.+?)](.+?)\[\/url]\n\[code](.|\n)*?\[\/code]

Although i tested on Regexr tool:

Image

_________________
Only4Free® | Media Center Network®


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 4th, 2019, 7:12 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12630
Location: Earth
This is regex is incorrect. You're not escaping "[" and you don't need to escape "/" at all.

Looks like you used php-like regex which a bit different.

Could you write "before" and "after" example. I could write the correct regex then.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 4th, 2019, 7:24 pm 

Joined: September 11th, 2011, 6:44 pm
Posts: 57
Dear Freddy,

Thanks for your help. I got the correct Regrex. Here is the sample for anyone who need:

Search:

Code:
(?i)\[url=(.+?)\](.+?)\[\/url\]\n(?s)\[code\](.+?)\[\/code\]


Replace
Code:
[spoiler=$2]$3[/spoiler]



And for 2nd case:

Code:
(?i)\[code\](?s)(.+?)\[url=(.+?)\](.+?)\[\/url\]\n(?s)(.+?)\[\/code\]


Replace:
Code:
[code]$1[/code]\n[spoiler=3]$4[/spoiler]

_________________
Only4Free® | Media Center Network®


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 6th, 2019, 2:27 pm 

Joined: September 11th, 2011, 6:44 pm
Posts: 57
Freddy wrote:
This is regex is incorrect. You're not escaping "[" and you don't need to escape "/" at all.

Looks like you used php-like regex which a bit different.

Could you write "before" and "after" example. I could write the correct regex then.



Hello Freddy,

Can you please help me to make the regrex for this?

Before:

Code:
[url=https://abc.com/javascript:ShowOrHide('spd2c0a680d8676e2914f4d4186080e60b')]"2019 - Kyrill Kondrashin Edition (1937-1963)" © Profil[/url][color=#006699]01.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": I. Babi Yar: Adagio [color=#708090][15:03][/color]
[color=#006699]02.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": II. Yumor (Humour): Allegretto [color=#708090][07:52][/color]
[color=#006699]03.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": III. V Magazine (In the Store): Adagio - [color=#708090][11:06][/color]
[color=#006699]04.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": IV. Strachi (Fears): Largo - [color=#708090][10:30][/color]
[color=#006699]05.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": V. Kariera (a Career): Allegretto [color=#708090][12:05][/color]
Anything
Anything
....
...




After:

Code:
[spoiler="2019 - Kyrill Kondrashin Edition (1937-1963)" © Profil]
[color=#006699]01.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": I. Babi Yar: Adagio [color=#708090][15:03][/color]
[color=#006699]02.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": II. Yumor (Humour): Allegretto [color=#708090][07:52][/color]
[color=#006699]03.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": III. V Magazine (In the Store): Adagio - [color=#708090][11:06][/color]
[color=#006699]04.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": IV. Strachi (Fears): Largo - [color=#708090][10:30][/color]
[color=#006699]05.[/color] Vitaly Gromadsky - Symphony No. 13 in B-Flat Minor, Op. 113 "Babi-yar": V. Kariera (a Career): Allegretto [color=#708090][12:05][/color]
Anything
Anything
....
...
[/spoiler]



I cannot find the last couple \n to make regrex.

Here is my regrex:

Code:
(?i)\[url=(.+?)ShowOrHide\((.+?)\)\](.+?)\[\/url\](?i)(.+?)\n\n


But it doesn't match.

_________________
Only4Free® | Media Center Network®


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: January 6th, 2019, 6:38 pm 

Joined: September 11th, 2011, 6:44 pm
Posts: 57
Hello Freddy,

Finally, i got it:

Code:
(?i)\[url=(.*?)ShowOrHide\((.*?)\)\](.*?)\[\/url\](.[\s\S]*?)\n\n

_________________
Only4Free® | Media Center Network®


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: June 1st, 2019, 3:04 pm 

Joined: December 30th, 2013, 3:54 pm
Posts: 319
nvm I managed to do it in some other way. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: July 25th, 2019, 5:57 pm 

Joined: September 19th, 2018, 3:10 pm
Posts: 10
Before
ATKGirlfriends 14 04 30 Mary Jane Mayhem
After
ATKGirlfriends Mary Jane Mayhem


Top
 Profile  
Reply with quote  
 Post subject: Re: Replacements help topic.
PostPosted: July 25th, 2019, 8:02 pm 
Site Admin
User avatar

Joined: March 10th, 2011, 11:14 pm
Posts: 12630
Location: Earth
Search for:
Code:
[0-9]+\s[0-9]+\s[0-9]+\s


Replace with:
Code:
(leave empty)


Enable regex search.

_________________
themaPoster | themaCreator | themaManager | themaLeecher | themaRegister


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 283 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 19  Next

Who is online

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