3
3
36ilya2021-12-16 13:49:38
Regular Expressions
36ilya, 2021-12-16 13:49:38

How to leave only the first letters of words in notepad++?

Good afternoon friends! Help solve the problem, only the first letters of the words should remain; a

line of this kind:

St. Petersburg Polytechnic University of Peter the Great

, you need to get

SPBPPUPV

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2021-12-16
@36ilya

Since this is an abbreviation, you first need to make the first letters capitalized (large). For simplicity, you can generally make the entire text like this, anyway, then we will cut off the excess. Press Ctrl+A to select everything, then Ctrl+Shift+U .
Then we are already looking for a regular expression. We skip the first word. We are looking for words that are preceded by a space, and remove this very space and everything except the first letter from such words.
Find: ([^ \n])[^ \n]+ (add a space at the beginning)
Replace with: \1

picture
61bb24975fcbc041506539.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question