Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th September 2022, 05:32   #1  |  Link
Firestorm
Registered User
 
Join Date: Aug 2022
Posts: 3
Need help creating regex to change italic markings

Hi all,

I'm hoping more experienced users can help me out.

I'm trying to create a regex that will alter all italic markings to go from something like this:

<i>JOHN: Thanks.</i>

to

JOHN: <i>Thanks.</i>
Firestorm is offline   Reply With Quote
Old 4th September 2022, 07:59   #2  |  Link
Nikse555
Registered User
 
Join Date: Feb 2004
Location: Mars
Posts: 414
Something like this?

Nikse555 is offline   Reply With Quote
Old 4th September 2022, 09:42   #3  |  Link
Firestorm
Registered User
 
Join Date: Aug 2022
Posts: 3
This works like a dream! Thank you so much.

When you mentioned it before, I thought you were starting me off with a partial pattern. Didn't realize you had given me the whole thing.

Could the following conditions be added to this rule or a new one if it's easier?
  • If there's a space/numeral after the first word eg., "<i>MAN 1:" or "<i>WOMAN ON PA:"
  • If there's a dialogue dash before the first word eg., "<i>-MAN 1:"
Also, how can I tweak the regex above to do the same thing but where there are brackets?

<i>[man 2] How are you today?</i>

to this:

[man 2] <i>How are you today?</i>

Something like this?

(<i>)(\[[A-Z \d]\]) replace: $2 <i>

Last edited by Firestorm; 5th September 2022 at 23:27.
Firestorm is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.