help me debug my "word capitalizer" script

John Ladasky john_ladasky at sbcglobal.net
Thu Aug 23 03:34:25 EDT 2012


On Wednesday, August 22, 2012 3:28:18 AM UTC-7, Kamil Kuduk wrote:

> less file.txt | sed -e "s/\b\([a-z]\{4,\}\)/\u\1/g"

Say what?

Yes, you could do a crazy regex at the Linux prompt.  But... will you be able to retain that insane syntax in your head until the NEXT time you need to write something like that?  Probably not, unless you write awk all day.

That, ladies and gentlemen, is why there's Python.

I stopped programming for about 18 months a while back.  When I came back to Python and needed to do it again, I picked up right where I left off.



More information about the Python-list mailing list