Subtitleedit: All capital letters in all words.

Created on 25 Dec 2020  路  24Comments  路  Source: SubtitleEdit/subtitleedit

I need to change all letters in words to uppercase.
In regex, I use \U or \L and I get the result as in the screenshot. Anyone have an idea what I should enter there?
image

All 24 comments

Regex in .NET doesn't support the \U and \L.

Thanks.

Also, there isn't any substitute.

You can:

  1. Select all lines.
  2. Copy text only to clipboard.
  3. Paste it in Regex101 and apply your regex.
  4. Copy the result.
  5. Go to the first selected line in SE and right-click -> Column -> Paste from clipboard

For the more frequent errors I defined separate expressions. The rest I corrected manually.
Thanks again.

@OmrSi However, when pasting back to SE, empty lines will be taken into account, not sure if it's something to fix. :-/

@LeonCheung How so? Column paste from clipboard allows you to paste only text and takes the empty lines in the text as an indication to new lines.

I don't know, it shouldn't be like that but just confirmed in the beta 300 and 353.

For the test I made these corrections again. It was working. I copied and pasted from the source view.

Ah oh, it occurs to me even with 3.5.1. I'm soooooo puzzled....
test gif

@LeonCheung Just took a look at the code, it actually just pastes every line in a paragraph even if it's empty.

Then how to explain the GIF? 馃ぃ

You missunderstood.
It just takes every line in the copied text and pastes it to a line in the list view.

Meaning if you have:

Line1B

it will paste each line into a list view item, even if the line is a space.

Ah I see. It puzzled me because I tried to follow your idea above step by step, but couldn't get the expected result, so...

That's my bad. I thought it worked that way.
Turned out I just copy the time with the text all the time, so I thought that was the default behavior.
I don't know which is better, tbh.

It's okay just... it reminded me on a specific workflow in real life. Similar to what's mentioned in #1528. Maybe that's another topic.

In the case here, a bit brainstorm can be no harm :) like:

brake

I don't know if Line break is exactly right here, it should be something like lines separator.

Ah yes, you are right.

I need to change all letters in words to uppercase.

Have you tried Tools - Change casing... ?

@niksedk He seems to have a letter at the end of the regex, so I guess he only wants to change certain words?

It is just like OmrSi says. I wanted to uppercase the text between "<<" and "艁". These are descriptions for the hearing impaired, which I wanted to highlight in capital letters and in color. This is how they are presented in alphabetical order.

image

Edit
I was able to solve my problem only using SE :)
Step 1: I have replaced the characters "<<" and "艁" with brackets "(((" and ")))".
Step 2: I used the HI2UC plug.
Step 3: I replaced the brackets with the color tags.

Boss :P

@borifax Very nice tip. I didn't know that plug-in, and it's very powerful, not sure @ivandrofly can see this.

Here here... maybe have a option in HI2UC to allow user to define token for start&end of HI? /cc @LeonCheung

@ivandrofly Oh then it would definitely be even better if technically possible. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PannenkoekenNL picture PannenkoekenNL  路  3Comments

frozenspider picture frozenspider  路  5Comments

LeonCheung picture LeonCheung  路  5Comments

07416 picture 07416  路  5Comments

m0ck69 picture m0ck69  路  5Comments