Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27625
| References | <CAE7MaQbrdVbbFWDJ8GHuoybT2SNPfZyyMFU_beBc_zMKpBHPFg@mail.gmail.com> |
|---|---|
| From | Kamil Kuduk <kamil.kuduk@gmail.com> |
| Date | 2012-08-22 12:28 +0200 |
| Subject | Re: help me debug my "word capitalizer" script |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3643.1345631321.4697.python-list@python.org> (permalink) |
> Purpose of the script:
> To capitalize the first letter of any word in a given file, leaving
> words which have 3 or less letters.
First or all? If first and this is the only purpose of the script you
can easily use sed:
less file.txt | sed -e "s/\b\([a-z]\{4,\}\)/\u\1/g"
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: help me debug my "word capitalizer" script Kamil Kuduk <kamil.kuduk@gmail.com> - 2012-08-22 12:28 +0200 Re: help me debug my "word capitalizer" script John Ladasky <john_ladasky@sbcglobal.net> - 2012-08-23 00:34 -0700 Re: help me debug my "word capitalizer" script John Ladasky <john_ladasky@sbcglobal.net> - 2012-08-23 00:34 -0700
csiph-web