3 ms·
The extension of that can also be handy and is often overlooked. Contrived example: "28 men are 32 years old"[/(\d+) (year|day|month)/, 1] # => "32"
by petercooper 13y ago
The extension of that can also be handy and is often overlooked. Contrived example:
"28 men are 32 years old"[/(\d+) (year|day|month)/, 1] # => "32"