# Escaping a period (.)

**URL:** <https://www.ruby-forum.com/t/escaping-a-period/183129>\
**Category:** Ruby\
**Created:** [February 8, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/escaping-a-period/183129 "2010-02-08T19:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [February 8, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/escaping-a-period/183129/1 "2010-02-08T19:08:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [February 8, 2010, 7:10pm UTC](https://www.ruby-forum.com/t/escaping-a-period/183129/2 "2010-02-08T19:10:30Z")

</div>

John M. 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](http://www.marnen.org)  
removed\_email\_address@domain.invalid
