Forum: Ruby Escaping a period (.)

Posted by John Mcleod (johnm)
on 2010-02-08 19:08
Hello all,
I'm in my 4 month of Ruby on Rails and had a question about escaping
special characters.
How do I escape a period(.)?

ie (John F. oobar)

I wish to change the period to an ASCII representation.

Thank you for any help.

JohnM
Posted by Marnen Laibow-Koser (marnen)
on 2010-02-08 19:10
John Mcleod wrote:
> Hello all,
> I'm in my 4 month of Ruby on Rails and had a question about escaping
> special characters.
> How do I escape a period(.)?
> 
> ie (John F. oobar)
> 
> I wish to change the period to an ASCII representation.

The period is an ASCII character.  It has no special meaning outside of 
regexps, and needs no escaping except in that context.

> 
> Thank you for any help.
> 
> JohnM


Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.