Created
September 14, 2012 12:18
-
-
Save andycamp/3721600 to your computer and use it in GitHub Desktop.
Same File Name but Different Extensions
This file contains hidden or 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
| def same_name_diff_extensions(search_val,arr) | |
| arr.map{ |i| i unless i.match(%r{^#{search_val}\..*}).nil? }.compact | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment