1

Lets say I have hundreds and thousands of lines of text like this:

yes:nice
up:true
six:hello
nine:mouse
twenty:cat

I want it to be able to do this:

yes:Nice1
up:True1
six:Hello1
nine:Mouse1
twenty:Cat1

So each line has 1 side with text/numbers, and a colon (:) separating another side with more text/numbers.

Is there a way to mass modify the each lines to make the starting character after the colon (:) UPPERCASE?

Also I want to know how to add any number(s) on the end of every single line.

Basically I want to know how to change the capitalisation of a character after the colon and how to add any numbers I want to the end.

Toto
  • 89,455
  • 62
  • 89
  • 125

1 Answers1

0

Here is a way to do the job:

  • Ctrl+H
  • Find what: ^([^:]+:)(.)(.*)$
  • Replace with: $1\U$2\E${3}1
  • Replace all

Explanation:

^               : begining of line
  ([^:]+:)      : group 1, every thing before the colon & the colon
  (.)           : group 2, 1 character
  (.*)          : group 3, every thing after the first character
$

Replacement:

$1              : group 1
\U$2\E          : group 2, uppercase
${3}            : group 3
1               : the digit 1, or anything you want to append.

Result for given example:

yes:Nice1
up:True1
six:Hello1
nine:Mouse1
twenty:Cat1
Toto
  • 89,455
  • 62
  • 89
  • 125