Skip to content

Instantly share code, notes, and snippets.

@zw963
Created July 12, 2021 06:42
Show Gist options
  • Save zw963/c796edfad0b4c7b2fce5951d84cb2dd7 to your computer and use it in GitHub Desktop.
Save zw963/c796edfad0b4c7b2fce5951d84cb2dd7 to your computer and use it in GitHub Desktop.
res = []
File.foreach('mastering-roda.org').each do |line_content|
line_content.scan(/(\b\w{2,}\b) (\b\k<1>\b)/).each do |e|
next if e == ['btn', 'btn']
res << [line_content, e]
end
end
ap res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment