Login
Roast topics
Find topics
Find it!
From:
Leigh Halliday's RSS Feed
(Uncensored)
subscribe
Named Captures in Ruby Regular Expressions
https://www.leighhalliday.com/named-captures-ruby-regular-expressions
links
backlinks
Tagged with:
ruby
regex
Roast topics
Find topics
Roast it!
In Ruby we can use the match method which belongs to the String class to both check a string for a regular expression match but also to extract data using captures. Captures allow you to extract part of the string... to isolate it. You do this by…