# Ruby's regex

**URL:** <https://www.ruby-forum.com/t/rubys-regex/194809>\
**Category:** Ruby\
**Created:** [September 11, 2010, 5:01am UTC](https://www.ruby-forum.com/t/rubys-regex/194809 "2010-09-11T05:01:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Young\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e36b37/32.png) [@Young\_W](https://www.ruby-forum.com/u/Young_W)\
**Post date:** [September 11, 2010, 5:01am UTC](https://www.ruby-forum.com/t/rubys-regex/194809/1 "2010-09-11T05:01:08Z")

</div>

However, regular expression support is typically built into only  
scripting languages,  
such as Ruby, Perl, and awk. This is a shame: regular expressions,  
although cryptic,  
are a powerful tool for working with text. And having them built in,  
rather than tacked  
on through a library interface, makes a big difference.

The above statement is in the book “Programming Ruby” the second  
edition.  
Why the author said “this is a shame”? I don’t understand well. Thanks.

Regards.

---

<div class="post-metadata">

**Author:** ![Young\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e36b37/32.png) [@Young\_W](https://www.ruby-forum.com/u/Young_W)\
**Post date:** [September 11, 2010, 5:45am UTC](https://www.ruby-forum.com/t/rubys-regex/194809/2 "2010-09-11T05:45:36Z")

</div>

On Sep 10, 10:48 pm, Young W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Regards.

I see that language was carried along into the second edition. I take  
the authors’ bemoan the fact that you can’t conveniently use regex’s  
in command-line expressions or C++ programs AFAIK, etc. Perhaps if  
there were stand-alone regex packages, then possibly regex’s could be  
integrated into other packages.

On the other hand, the authors may have totally different things in  
mind.

HTH,  
Richard

---

<div class="post-metadata">

**Author:** ![Young\_W](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/e36b37/32.png) [@Young\_W](https://www.ruby-forum.com/u/Young_W)\
**Post date:** [September 11, 2010, 5:50am UTC](https://www.ruby-forum.com/t/rubys-regex/194809/3 "2010-09-11T05:50:18Z")

</div>

On Fri, Sep 10, 2010 at 10:48 PM, Young W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> However, regular expression support is typically built into only  
> scripting languages,  
> such as Ruby, Perl, and awk. This is a shame: regular expressions,  
> although cryptic,  
> are a powerful tool for working with text. And having them built in,  
> rather than tacked  
> on through a library interface, makes a big difference.
> 
> The above statement is in the book “Programming Ruby” the second edition.  
> Why the author said “this is a shame”? I don’t understand well. Thanks.

I believe the author means that it would be wonderful if other  
languages had built-in regular expressions too.

(it’s a shame that other languages don’t have built-in regex support  
=\> it would be wonderful if they did)
