Text processing method (find and replace section of codes)?

Status
Not open for further replies.

legendbb

Member level 1
Joined
Nov 16, 2013
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,516
Dear expert,

What's the best and secure method to turn source code sections as following:
Code:
if (condition) 
[INDENT]do_something{multiple lines}[/INDENT]
else
[INDENT]do_something_else{multiple_lines}[/INDENT]

into:
Code:
[INDENT]do_something{multiple_lines}[/INDENT]

I am looking for something like script, or macro search/replace and reformat text.

Really appreciated, if some quick small example can be shared.
 
Last edited:

This is a weird question, as it looks like you have answered it yourself.

Hmm... do you mean, how can you search and replace many instances? If so, you could either write your own script or use a text editor. For example, Notepad++ is free to download and has a very powerful search-and-replace feature. If you search online, you'll find lots of usage examples. For example, see this: [link].
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…