Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Editing a specific place with notepad++

I need to replace a text in Notepad++. How can i do?

Text:

(1, 1, 'qweq123we123'),
(2, 1, 'qwe5qw123e42'),
(3, 1, 'qweq1233we61'),
(4, 1, 'qwe41qdw613e'),
(5, 1, 'qweq12f3w41e'),
(6, 1, 'qw21233eaqwe'),
(7, 1, 'qw5123ge3qwe'),

Replaced Text:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

{"id":1,"ilid":1,"qweq123we123"}
{"id":1,"ilid":2,"qwe5qw123e42"}
{"id":1,"ilid":3,"qweq1233we61"}
{"id":1,"ilid":4,"qwe41qdw613e"}
{"id":1,"ilid":5,"qweq12f3w41e"}
{"id":1,"ilid":6,"qw21233eaqwe"}
{"id":1,"ilid":7,"qw5123ge3qwe"}

separately, i want to convert the result from qw5123ge3qwe to QW5123GE3QWE.

i searched on youtube and stackoverflow but could not find anything

>Solution :

You can use a regex search and replace. regex101.com

Search String:

\(([0-9]{1,}), ([0-9]{1,}), '([A-z0-9]{1,})'\)

Replace:

{"id":\1,"ilid":\2,"\U\3"}

\1 \2 \3 are tied to the ([]{1,}) content.
The \U makes anything after it to be uppercase.

[0-9] means any number between 0-9 (single character)

[0A-z0-9] means any number between 0-9 and any character between a-z including the different cases

{1,} this means it must have at least 1 character matching. Everything is done on a single character basis, so if the number is larger than 9 e.g. 10 this is 2 characters a ‘1’ + ‘0’, you could restrict the number of characters by doing something like {1,7}

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading