Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Conversation

@briantemple
Copy link

Thanks again, these challenges are fun!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String#split can accept a regex.

line.gsub(/[|\-+]/, "").strip.split(' ')

# is equivalent to

line.split(/[^\d\.]+/)

@briantemple
Copy link
Author

Thank you for the great feedback, Joël. Very much appreciated! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants