Kyshakk
Kyshakk

Reputation: 1

How to convert text only in brackets to uppercase in Notepad++

So I'm looking for a way to convert text like this [sample] into [SAMPLE] for example.

I already found a way to find text inside brackets like this one \[([a-z][\S\s]+?)\] but I'm looking for a way to replace with that actually turns the text inside uppercase with the brackets preserved.

Upvotes: 0

Views: 348

Answers (1)

Eduardo Galván
Eduardo Galván

Reputation: 962

In the Replace with field type:

[\U\1]

The \U modifier converts the following match into uppercase. You need to type the brackets too to preserve them.

Upvotes: 1

Related Questions