Skip to content

Instantly share code, notes, and snippets.

@Zarthus
Created August 22, 2016 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zarthus/c96400ccf4d46de8abbef62fdcab0537 to your computer and use it in GitHub Desktop.
Save Zarthus/c96400ccf4d46de8abbef62fdcab0537 to your computer and use it in GitHub Desktop.
re = /A ([Ff]eature|Bug) complete Regular Expression/m
str = 'A feature complete Regular Expression
A Bug complete Regular Expression
Sinkkuelämää'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment