Created
July 6, 2017 13:31
-
-
Save miyohide/9d7ff1965c61ae3e7e6db5c30a0a649b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = "'aaaa', 'bbb', 'ccc,ddd'" | |
s.scan(/['"](?:[^'\"])*['"]/) # => ["'aaaa'", "'bbb'", "'ccc,ddd'"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment