Jan. 21, 2017
1:19 p.m.
Nice one. str:= --> text := On Sat, Jan 21, 2017 at 10:07 AM, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
In Ruby it is dead simple: str[/\[(.*)\]/,1].hex # "=> 37" , or .to_i(16)
and dead unreadable
Pharo way is both dead simple and dead readable
str:= ' Temperature 0 37C (98F) [0x25] (TMPIN0)'.
('16r',(text copyWithRegex: '(.*\[0x)|(\].*)' matchesReplacedWith: '')) asNumber .