Last Updated: February 25, 2016
·
430
· dimitrismistriotis

Hexpress example for detecting image extension

IMAGE_EXTENSION_RE = Hexpress.new.either(['jpg', 'png', ..etc]).ending.to_r

Just implemented it and thought would be nice to post in case someone can spot flaws.