Mega Code Archive
Categories
/
Ruby
/
Development
An example of a regular expression used to match a string with the String method scan
hamlet = "The slings and arrows of outrageous fortune" puts hamlet.scan(/\w+/)