# Variable names limitation

**URL:** <https://www.ruby-forum.com/t/variable-names-limitation/79596>\
**Category:** Ruby\
**Created:** [December 16, 2006, 10:17pm UTC](https://www.ruby-forum.com/t/variable-names-limitation/79596 "2006-12-16T22:17:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerocoder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecae2f/32.png) [@zerocoder](https://www.ruby-forum.com/u/zerocoder)\
**Post date:** [December 16, 2006, 10:17pm UTC](https://www.ruby-forum.com/t/variable-names-limitation/79596/1 "2006-12-16T22:17:06Z")

</div>

Do we have any limitation in variable declerations. For instance how  
long a variable name can be? is there any name convention do we start a  
variable with a number (we tried and see it is not start with a number)  
but If you know any other limitation about variable such that could you  
share with us  
Thank you in advance.

---

<div class="post-metadata">

**Author:** ![zerocoder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/ecae2f/32.png) [@zerocoder](https://www.ruby-forum.com/u/zerocoder)\
**Post date:** [December 16, 2006, 10:37pm UTC](https://www.ruby-forum.com/t/variable-names-limitation/79596/2 "2006-12-16T22:37:05Z")

</div>

Noyan Aydin wrote:

> Do we have any limitation in variable declerations. For instance how  
> long a variable name can be? is there any name convention do we start a  
> variable with a number (we tried and see it is not start with a number)  
> but If you know any other limitation about variable such that could you  
> share with us  
> Thank you in advance.

AFAIK, it’s /[\_a-zA-Z][\_a-zA-Z0-9]\*/ 😜

A pretty much ubiquitous convention.

David V.
