Jan. 21, 2017
9:07 a.m.
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 .