ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: The Turing Machine (#162)
by Alpha Chen other posts by this author
May 15 2008 3:00PM messages near this date
Re: The Turing Machine (#162) | Re: The Turing Machine (#162)
Thanks for the writeup!

But a small nitpick... =)

On May 15, 11:26 am, Matthew Moss <matthew.m...@[...].com>  wrote:
>        puts @tape.sort.map {|_,v| v}.join.gsub(/^_*|_*$/, '')
> 
>  "useful" content of the tape is displayed. Chen's regular expression
>  (slightly corrected in the code shown above), removes all blanks
>  immediately after the start of the line _or_ immediately preceding the
>  end of the line.

Shouldn't the regex return "a" instead of "a_b" for "_a_b_"?
Thread:
Matthew Moss
Adam Shelly
James Koppel
Alpha Chen
Matthew Moss
Alpha Chen
Alpha Chen
Matthew Moss
Robert Dober
Alpha Chen
Matthew Moss
Chiyuan Zhang
Juanger
Mike Stok
jgabrielygalan
Marcelo
Chiyuan Zhang
James Gray
Juanger
Matthew Moss
ThoML
Chris Shea
Chris Carter
Andrew Thompson
Sandro Paganotti
Chris Shea
ThoML
Chris Shea
Chris Shea
Glen F. Pankow
Adam Shelly
Matthew Moss
Chris Carter
Adam Shelly

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved