[squeak-dev] One liner challenge

Travis Griggs travisgriggs at gmail.com
Fri Mar 12 01:36:36 UTC 2010


(Preamble: I have lurked here without really paying attention much for  
a year+ now. I thought I'd try to reinvolve myself. The following  
discussions are some of my favorite/funnest).

I was looking at someone's ruby/regex code. I could do the equivalent  
of what they were doing with the ST Regex library. But I was curious  
if it could be done tersely/elegantly without using regex. Here's the  
challenge.

Given strings of the form

'This is a (string) with some (parenthetical fields)'

turn them into

'This is a (STRING) with some (PARENTHETICAL FIELDS)'

--
Travis Griggs
Objologist
"Dying men never wish they'd spent more time at the office"





More information about the Squeak-dev mailing list