Using Ruby named group regex with gsub

Ruby 1.9.2+ supports regex named

Most of the examples of using them on the net are about using them with
match and scan.

Here is an example of using them with gsub:

Khash Sajadi

Khash is the founder and CEO of Cloud 66, a full stack container management as a service. Follow him on @khash

London, UK and San Francisco, US
Subscribe and get updates

Have feedback? Please get in touch @cloud66 on Twitter.

Everything you need to build, manage and maintain containers in production on your own servers and any cloud

Try Cloud 66 — 14 Days Free Trial, No credit card required