Top "Substitution" questions

The action of replacing something with another thing.

Bash eval replacement $() not always equivalent?

Everybody says eval is evil, and you should use $() as a replacement. But I've run into a situation where the …

bash eval substitution quote
How do I use the C preprocessor to make a substitution with an environment variable

In the code below, I would like the value of THE_VERSION_STRING to be taken from the value of …

c++ environment-variables c-preprocessor substitution
How many substitutions took place in a Perl s///g?

Small example: perl -e '$s="aaabbcc";$c=()=$s=~/a/g;print"$c\n$s\n"' (m//g) outputs 3 …

regex perl substitution
BASH script to pass variables without substitution into new script

As part of a system build script I have a script that creates various files and configurations. However one part …

bash substitution
vim replace character to \n

I need replace all ; to \n , but :%s/;/\n/gc not works

regex vim substitution
Best way to substitute variables in plain text using PHP

What's the best way to take some plain text (not PHP code) which contains PHP-style variables, and then substitute in …

php variables substitution