# Custom format specifiers

**URL:** <https://www.ruby-forum.com/t/custom-format-specifiers/69166>\
**Category:** Ruby\
**Created:** [September 19, 2006, 3:09am UTC](https://www.ruby-forum.com/t/custom-format-specifiers/69166 "2006-09-19T03:09:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![olbrich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/5f9b8f/32.png) [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Post date:** [September 19, 2006, 3:09am UTC](https://www.ruby-forum.com/t/custom-format-specifiers/69166/1 "2006-09-19T03:09:30Z")

</div>

Ruby has bunch of nifty shortcuts like

%W{}, %r{}, etc…

Is there any way to define a new one, or are these hard-wired?

\_Kevin  
[www.sciwerks.com](http://www.sciwerks.com)

---

<div class="post-metadata">

**Author:** ![olbrich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/5f9b8f/32.png) [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Post date:** [September 19, 2006, 3:11am UTC](https://www.ruby-forum.com/t/custom-format-specifiers/69166/2 "2006-09-19T03:11:30Z")

</div>

Kevin O. wrote:

> Ruby has bunch of nifty shortcuts like
> 
> %W{}, %r{}, etc…
> 
> Is there any way to define a new one, or are these hard-wired?

They’re hard-wired… but there has been some discussion  
of customized ones.

Hal
