Search This Blog

Sunday, September 12, 2010

Ruby Regex: Math on Backreferences

Programmer Question

I need to replace all minutes with hours in a file.



Assume a raw file like this:
120m
90m



Should change to:
2h
1.5h



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails