I would like to know the best program (Surely a text editor) to make string manipulation like string substituion.

By the way, I would like to do the next: String manipulation of type String substitution in mathematical expression

Thank you so much!

link|improve this question

67% accept rate
2  
On what platform? – GreenMatt Nov 23 '10 at 14:58
1  
To do the type of manipulation you asked about in your previous question, Perl or Python are your best bets (my answer there uses Perl). AWK might be able to do it. It would take a really complex sed script to even come close. It may be that the regex processing in vim or emacs is up to the challenge. @GreenMatt: The One True Platform - Windows. ;-) – Dennis Williamson Nov 23 '10 at 19:53
feedback

closed as not constructive by slhck, Simon Sheehan, Nifle, Daniel Beck, Oliver Salzburg Mar 11 at 15:31

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

2 Answers

up vote 3 down vote accepted

My preferences are in this order: perl, vim (vi, gvim, etc.) substitution commands, sed, and awk.

perl is a heavy software program that can do math as well. See http://perlmonks.org/ for more details.

Vi is the well known text editor all *ix systems have (Linux, Unix, etc.), which, incidentally, can do some nice scripting.

Sed is, well see http://linux.die.net/man/1/sed

Awk (gawk and its brethren) is, well see http://linux.die.net/man/1/awk

... almost forgot. The absolute best, and with a price tag to match, is PowerGrep. Without a doubt, the easiest way to formulate complex queries and replacements of text in DOC, TXT, and other files.

link|improve this answer
superuser.com/questions/39384/best-grep-like-tool if you are interested in regular expressions and Grep – Rolnik Nov 23 '10 at 15:10
feedback

Take a look at sed

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.