Interesting.  Not what I expected.  This is Ruby 1.8.6.

> irb
irb(main):001:0> str = "abx\bc"
=> "abx\bc"
irb(main):002:0> str.length
=> 5
irb(main):003:0> s = str.sub(/.\b/, '')
=> "ab\bc"
irb(main):004:0> s.length
=> 4
irb(main):005:0> s = str.sub(/.\x08/, '')
=> "abc"
irb(main):006:0> s.length
=> 3
irb(main):007:0> 

Backspace character representation in ASCII, UTF-8, etc. is 8.

Jeffrey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to