themaLeecher
http://leecher.themasoftware.com/forum/

Replacements help topic.
http://leecher.themasoftware.com/forum/viewtopic.php?f=4&t=5860
Page 14 of 19

Author:  Freedom35 [ January 17th, 2018, 8:46 am ]
Post subject:  Re: Replacements help topic.

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>

Author:  Freddy [ January 17th, 2018, 9:52 am ]
Post subject:  Re: Replacements help topic.

Search for:
Code:
(?s)xzxzxz.+?zazaza


Replace with:
Code:
<imdbInfo>


Enable regex search.

Author:  Freedom35 [ January 17th, 2018, 7:58 pm ]
Post subject:  Re: Replacements help topic.

Thank You Freddy

Take care :)

Author:  Freedom35 [ October 20th, 2018, 8:02 am ]
Post subject:  Re: Replacements help topic.

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.

Author:  Freddy [ October 21st, 2018, 6:01 am ]
Post subject:  Re: Replacements help topic.

Search for:
Code:
(?is)https?://1fichier.+


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


Enable regex.

Author:  Freedom35 [ October 21st, 2018, 7:24 am ]
Post subject:  Re: Replacements help topic.

Great, it's working :)
Thank You

Author:  mrcas [ January 4th, 2019, 4:09 pm ]
Post subject:  Re: Replacements help topic.

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]


Author:  mrcas [ January 4th, 2019, 6:06 pm ]
Post subject:  Re: Replacements help topic.

I tried with this regrex, but it does not work

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

Although i tested on Regexr tool:

Image

Author:  Freddy [ January 4th, 2019, 7:12 pm ]
Post subject:  Re: Replacements help topic.

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.

Author:  mrcas [ January 4th, 2019, 7:24 pm ]
Post subject:  Re: Replacements help topic.

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]

Author:  mrcas [ January 6th, 2019, 2:27 pm ]
Post subject:  Re: Replacements help topic.

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.

Author:  mrcas [ January 6th, 2019, 6:38 pm ]
Post subject:  Re: Replacements help topic.

Hello Freddy,

Finally, i got it:

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

Author:  Freedom35 [ June 1st, 2019, 3:04 pm ]
Post subject:  Re: Replacements help topic.

nvm I managed to do it in some other way. :D

Author:  keepitcome25 [ July 25th, 2019, 5:57 pm ]
Post subject:  Re: Replacements help topic.

Before
ATKGirlfriends 14 04 30 Mary Jane Mayhem
After
ATKGirlfriends Mary Jane Mayhem

Author:  Freddy [ July 25th, 2019, 8:02 pm ]
Post subject:  Re: Replacements help topic.

Search for:
Code:
[0-9]+\s[0-9]+\s[0-9]+\s


Replace with:
Code:
(leave empty)


Enable regex search.

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