Created
February 14, 2017 07:33
-
-
Save raviwu/d304bfa6e2167376802ec3488c290c51 to your computer and use it in GitHub Desktop.
Common Regex
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
# URL with http:// or https:// | |
%r{\A(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?\z}ix | |
/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment