Created
June 1, 2015 19:40
-
-
Save davidmz/f5adb52d186caf272062 to your computer and use it in GitHub Desktop.
PCRE для поиска URL в строке
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
\b | |
(?: | |
(?:(https?|ftp)://|www\.)(?:[a-zа-я0-9-]+\.)*[a-zа-я0-9]+ | |
| | |
(?:[a-zа-я0-9][a-zа-я0-9-]*\.)+(?:ru|com|net|org|рф)(?![\w-]) | |
) | |
[^<>\s]* | |
(?: | |
(?<![[:punct:]]) | |
| | |
(?<=[-/_&+*]) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment