I am not very familiar with TeX's category codes. If I use
\catcode`\|=13 \renewcommand{|}{hello world}
then every use of | in my document will be replaced by hello world. However, how would I be able to still print the | sign? Of course, the circular reference
\catcode`\|=13 \renewcommand{|}{hello|world}
does not work (exceeding TeX's majestic capacity), although I would like all instances of | to print as hello|world. And, if I'm correct, the above would just hold for regular text mode. How would the above code change if | was to be used in math mode?