-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter Loftus wrote:
| val = " hello ".sub(/\t/, ' ')
| puts val
|
| Cant covert tabbed spaces into regular single spaces
| Anyone have any ideas?
You could use a regex that converts whitespace into a single space, in
case tbas aren't the \t character, but are expanded to spaces.
http://doc.infosnel.nl/ruby_regular_expressions.html
(Best thing I found but Programming Ruby and The Ruby Way cover this,
and Programming Ruby's 1st Edition is available for free.)
- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
~ - You know you've been hacking too long when...
...you discover that you're balancing your checkbook in octal.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkgIrcEACgkQbtAgaoJTgL/e5gCfdyBs9dyQZ7kIv+linqY74Wuo
6CMAn0apfDaUFdk8SFswZTk9KMuWMWPV
=Whnf
-----END PGP SIGNATURE-----