# Regular Expressions

**URL:** <https://rubytalk.org/t/regular-expressions/9816>\
**Category:** ruby-talk\
**Created:** [23 January 2004 15:32 UTC](https://rubytalk.org/t/regular-expressions/9816 "2004-01-23T15:32:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rove\_Monteux](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@Rove\_Monteux](https://rubytalk.org/u/Rove_Monteux)\
**Post date:** [23 January 2004 15:32 UTC](https://rubytalk.org/t/regular-expressions/9816/1 "2004-01-23T15:32:55Z")

</div>

Hi there,

Sorry for posting this one on the list. Anyone has any documentation/URL  
of a beginner to advanced Regular Expressions on Ruby with examples and  
all ?

Thanks !

Rove Monteux

> **···**
>
> –  
> Rove Monteux  
> Systems Administrator
> 
> [rove.monteux@fluid-rock.com](mailto:rove.monteux@fluid-rock.com)

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://rubytalk.org/u/Robert)\
**Post date:** [23 January 2004 15:44 UTC](https://rubytalk.org/t/regular-expressions/9816/2 "2004-01-23T15:44:59Z")

</div>

“Rove Monteux” [rove.monteux@fluid-rock.com](mailto:rove.monteux@fluid-rock.com) schrieb im Newsbeitrag  
[news:40113E75.1020100@fluid-rock.com](mailto:news:40113E75.1020100@fluid-rock.com)…

> Hi there,
> 
> Sorry for posting this one on the list. Anyone has any documentation/URL  
> of a beginner to advanced Regular Expressions on Ruby with examples and  
> all ?

There’s a bit on the Wiki:

> **[WebMD - Better information. Better health.](https://www.webmd.com/?HomePage)**
>
> The leading source for trustworthy and timely health and medical news and information. Providing credible health information, supportive community, and educational services by blending award-winning expertise in content, community services, expert...

Search for “regular expression” and “regularexpression”

```
robert

```

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Ara.T.Howard](https://rubytalk.org/u/Ara.T.Howard)\
**Post date:** [23 January 2004 16:04 UTC](https://rubytalk.org/t/regular-expressions/9816/3 "2004-01-23T16:04:57Z")

</div>

get the oreily regex book. it’s one of their best books.

-a

> **···**
>
> On Sat, 24 Jan 2004, Rove Monteux wrote:
> 
> > Date: Sat, 24 Jan 2004 00:32:55 +0900  
> > From: Rove Monteux [rove.monteux@fluid-rock.com](mailto:rove.monteux@fluid-rock.com)  
> > Newsgroups: comp.lang.ruby  
> > Subject: Regular Expressions
> > 
> > Hi there,
> > 
> > Sorry for posting this one on the list. Anyone has any documentation/URL  
> > of a beginner to advanced Regular Expressions on Ruby with examples and  
> > all ?
> > 
> > Thanks !
> > 
> > Rove Monteux
> 
> –
> 
> ATTN: please update your address books with address below!
> 
> ===============================================================================
> 
> > EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov  
> > PHONE :: 303.497.6469  
> > ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328  
> > STP :: [Solar-Terrestrial Physics Data | NCEI](http://www.ngdc.noaa.gov/stp/)  
> > NGDC :: [http://www.ngdc.noaa.gov/](http://www.ngdc.noaa.gov/)  
> > NESDIS :: [http://www.nesdis.noaa.gov/](http://www.nesdis.noaa.gov/)  
> > NOAA :: [http://www.noaa.gov/](http://www.noaa.gov/)  
> > US DOC :: [http://www.commerce.gov/](http://www.commerce.gov/)
> > 
> > The difference between art and science is that science is what we  
> > understand well enough to explain to a computer.  
> > Art is everything else.  
> > – Donald Knuth, “Discover”
> > 
> > /bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’  
> > ===============================================================================

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [24 January 2004 04:49 UTC](https://rubytalk.org/t/regular-expressions/9816/4 "2004-01-24T04:49:56Z")

</div>

Rove Monteux wrote:

> Sorry for posting this one on the list. Anyone has any documentation/URL  
> of a beginner to advanced Regular Expressions on Ruby with examples and  
> all ?

Although not specific to the Ruby language, the JS introduction to  
RegExp is rather good, and shares almost exactly the same syntax.

(long url ahead, watch for undesired line breaks)

> **[Technical documentation](https://learn.microsoft.com/en-us/docs/)**

> **···**
>
> –  
> (-, /\ / / //

---

<div class="post-metadata">

**Author:** ![Sam\_Roberts1](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sam\_Roberts1](https://rubytalk.org/u/Sam_Roberts1)\
**Post date:** [23 January 2004 16:55 UTC](https://rubytalk.org/t/regular-expressions/9816/5 "2004-01-23T16:55:50Z")

</div>

Quoteing [ahoward@fattire.ngdc.noaa.gov](mailto:ahoward@fattire.ngdc.noaa.gov), on Sat, Jan 24, 2004 at 01:04:57AM +0900:

> > Sorry for posting this one on the list. Anyone has any documentation/URL  
> > of a beginner to advanced Regular Expressions on Ruby with examples and  
> > all ?
> 
> get the oreily regex book. it’s one of their best books.

I heartily second that. Let me rave about the book! 🙂

Some O’Reilly books are canonical on their subject, and some are fluff.

Its amazing to compare “Mastering Regular Expressions” with “Programming  
Web Services with XML-RPC”.

I picked the first up off a coworkers shelf out of curiousity, thinking  
I knew regular expressions fairly well, and wondering how anybody could  
possibly devote a whole book to it. It blew my mind. I haven’t even come  
close to reading and understanding it all, and I still learned how to do  
things I didn’t even know were possible.

The XML-RPC book, on the other hand, describes all of XML-RPC (the  
protocol) in a single chapter, its that simple, and then consists of a  
handful of sample apps in a few different languages.

All of which is fine, except it was about the same size and slightly  
more expensive the the RegEx book! It should have been published in the  
pocket reference format for half the price, and an eighth of the  
physical weight. It has less info in it than the “Objective-C Pocket  
Reference”, which is a brilliant and concise little work.

Speaking of O’Reilly, they make a great Lex and Yacc book, or used to.

Sam

---

<div class="post-metadata">

**Author:** ![Nikolai\_Weibull3](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@Nikolai\_Weibull3](https://rubytalk.org/u/Nikolai_Weibull3)\
**Post date:** [23 January 2004 16:59 UTC](https://rubytalk.org/t/regular-expressions/9816/6 "2004-01-23T16:59:27Z")

</div>

- Ara.T.Howard [ahoward@fattire.ngdc.noaa.gov](mailto:ahoward@fattire.ngdc.noaa.gov) [Jan, 23 2004 17:20]:

> –
> 
> ATTN: please update your address books with address below!
> 
> ===============================================================================
> 
> > EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov  
> > PHONE :: 303.497.6469  
> > ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328  
> > STP :: [Solar-Terrestrial Physics Data | NCEI](http://www.ngdc.noaa.gov/stp/)  
> > NGDC :: [http://www.ngdc.noaa.gov/](http://www.ngdc.noaa.gov/)  
> > NESDIS :: [http://www.nesdis.noaa.gov/](http://www.nesdis.noaa.gov/)  
> > NOAA :: [http://www.noaa.gov/](http://www.noaa.gov/)  
> > US DOC :: [http://www.commerce.gov/](http://www.commerce.gov/)
> > 
> > The difference between art and science is that science is what we  
> > understand well enough to explain to a computer.  
> > Art is everything else.  
> > – Donald Knuth, “Discover”
> > 
> > /bin/sh -c ‘for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done’  
> > ===============================================================================

I don’t want to whine, but you don’t think this signature is a bit much?  
OK, so you work for the government, do we really need to know all of  
your branch’s urls? And, as much as I appreciate a Knuth quote, perhaps  
having an url with a collection of ones appreciated would be better?  
nikolai

> **···**
>
> –  
> ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::  
> ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::  
> ::: page: [www.pcppopper.org](http://www.pcppopper.org) :: fun atm: gf,lps,ruby,lisp,war3 :::  
> main(){printf(&linux[“\021%six\012\0”],(linux)[“have”]+“fun”-97);}

---

<div class="post-metadata">

**Author:** ![Rove\_Monteux](https://avatars.discourse-cdn.com/v4/letter/r/c4cdca/32.png) [@Rove\_Monteux](https://rubytalk.org/u/Rove_Monteux)\
**Post date:** [23 January 2004 17:06 UTC](https://rubytalk.org/t/regular-expressions/9816/7 "2004-01-23T17:06:07Z")

</div>

Hi,

Yes, I own the Lex & Yacc book from Oreily, fairly good may say so. Will  
have a look on the regex book, Im coming from java to ruby, still used  
to the String.indexOf and .lastIndexOf type of thing, regex a whole new  
world to me 🙂

Thanks !

Rove Monteux

Sam Roberts wrote:

> **···**
>
> > Quoteing [ahoward@fattire.ngdc.noaa.gov](mailto:ahoward@fattire.ngdc.noaa.gov), on Sat, Jan 24, 2004 at 01:04:57AM +0900:
> > 
> > > > Sorry for posting this one on the list. Anyone has any documentation/URL  
> > > > of a beginner to advanced Regular Expressions on Ruby with examples and  
> > > > all ?
> > > 
> > > get the oreily regex book. it’s one of their best books.
> > 
> > I heartily second that. Let me rave about the book! 🙂
> > 
> > Some O’Reilly books are canonical on their subject, and some are fluff.
> > 
> > Its amazing to compare “Mastering Regular Expressions” with “Programming  
> > Web Services with XML-RPC”.
> > 
> > I picked the first up off a coworkers shelf out of curiousity, thinking  
> > I knew regular expressions fairly well, and wondering how anybody could  
> > possibly devote a whole book to it. It blew my mind. I haven’t even come  
> > close to reading and understanding it all, and I still learned how to do  
> > things I didn’t even know were possible.
> > 
> > The XML-RPC book, on the other hand, describes all of XML-RPC (the  
> > protocol) in a single chapter, its that simple, and then consists of a  
> > handful of sample apps in a few different languages.
> > 
> > All of which is fine, except it was about the same size and slightly  
> > more expensive the the RegEx book! It should have been published in the  
> > pocket reference format for half the price, and an eighth of the  
> > physical weight. It has less info in it than the “Objective-C Pocket  
> > Reference”, which is a brilliant and concise little work.
> > 
> > Speaking of O’Reilly, they make a great Lex and Yacc book, or used to.
> > 
> > Sam
> 
> –  
> Rove Monteux  
> Systems Administrator
> 
> [rove.monteux@fluid-rock.com](mailto:rove.monteux@fluid-rock.com)

---

<div class="post-metadata">

**Author:** ![Michael\_Campbell1](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Michael\_Campbell1](https://rubytalk.org/u/Michael_Campbell1)\
**Post date:** [24 January 2004 14:36 UTC](https://rubytalk.org/t/regular-expressions/9816/8 "2004-01-24T14:36:58Z")

</div>

Gavin Kistner wrote:

> Rove Monteux wrote:
> 
> > Sorry for posting this one on the list. Anyone has any  
> > documentation/URL of a beginner to advanced Regular Expressions on  
> > Ruby with examples and all ?
> 
> Although not specific to the Ruby language, the JS introduction to  
> RegExp is rather good, and shares almost exactly the same syntax.
> 
> (long url ahead, watch for undesired line breaks)
> 
> [Technical documentation | Microsoft Learn](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56reconIntroductionToRegularExpressions.asp)

When posting a long url, give [http://www.tinyurl.com/](http://www.tinyurl.com/) a try. That URL for example can also be: [http://tinyurl.com/yw7xg](http://tinyurl.com/yw7xg)

---

<div class="post-metadata">

**Author:** ![Josef\_Jupp\_SCHUGT](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Josef\_Jupp\_SCHUGT](https://rubytalk.org/u/Josef_Jupp_SCHUGT)\
**Post date:** [25 January 2004 22:58 UTC](https://rubytalk.org/t/regular-expressions/9816/9 "2004-01-25T22:58:14Z")

</div>

Hi!

- Michael campbell:

> When posting a long url, give [http://www.tinyurl.com/](http://www.tinyurl.com/) a try. That  
> URL for example can also be: [http://tinyurl.com/yw7xg](http://tinyurl.com/yw7xg)

Does anybody know what has happened to [qurl.org](http://qurl.org)? I recently tried to  
make a shorter link for

> **[IBM Developer](https://developer.ibm.com/technologies/linux/)**
>
> IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.

which I did copy and paste from the browser. For some unknown reason  
I got the well-known ‘What kind of URL is that, dumbass?’. I did  
report that issue to freaky(a)[qurl.net](http://qurl.net) but didn’t get a response so  
far :-\<

I prefer [qurl.org](http://qurl.org) for two reasons: The URL is shorter and - it is  
powered by Ruby.

Josef ‘Jupp’ SCHUGT

> **···**
>
> –  
> [http://oss.erdfunkstelle.de/ruby/](http://oss.erdfunkstelle.de/ruby/) - German comp.lang.ruby-FAQ  
> [http://rubyforge.org/users/jupp/](http://rubyforge.org/users/jupp/) - Ruby projects at Rubyforge  
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-  
> Germany 2004: To boldly spy where no GESTAPO / STASI has spied before

---

<div class="post-metadata">

**Author:** ![Michael\_Campbell1](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Michael\_Campbell1](https://rubytalk.org/u/Michael_Campbell1)\
**Post date:** [25 January 2004 23:51 UTC](https://rubytalk.org/t/regular-expressions/9816/10 "2004-01-25T23:51:05Z")

</div>

Josef ‘Jupp’ SCHUGT wrote:

> Hi!
> 
> - Michael campbell:
> 
> > When posting a long url, give [http://www.tinyurl.com/](http://www.tinyurl.com/) a try. That  
> > URL for example can also be: [http://tinyurl.com/yw7xg](http://tinyurl.com/yw7xg)
> 
> Does anybody know what has happened to [qurl.org](http://qurl.org)? I recently tried to  
> make a shorter link for
> 
> [IBM Developer](http://www-106.ibm.com/developerworks/linux/library/l-util.html?ca=dgr-lnxw03ArtWriting&S_TACT=103AMW38&S_CMP=DVCHL)
> 
> which I did copy and paste from the browser. For some unknown reason  
> I got the well-known ‘What kind of URL is that, dumbass?’. I did  
> report that issue to freaky(a)[qurl.net](http://qurl.net) but didn’t get a response so  
> far :-\<
> 
> I prefer [qurl.org](http://qurl.org) for two reasons: The URL is shorter and - it is  
> powered by Ruby.

[www.tinyurl.com](http://www.tinyurl.com) seems to be up and running, however.

I voiced this exact fear in August. ruby-talk:80351
