Regular Expressions 101

[php] url hard match

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
((?:(?:https?|ftp)+(?:\:\/\/))?)+(?:(?:(?:www(?:(?:[\d]{1})?)\.|[a-z0-9-_]{1,}))+\.(?:com|me|ru|net|biz|info|fm|su|ua|to|us|[a-z]{1,5}))+(?:(?:[a-z0-9\/\?=-_.&]{1,})?)
/
ism

Description

preg_math_all only. ex.: http://doman.com , http://doman.com/ , http://doman.com/?query=1,http://doman.com?query=1 , domain.com, doman.com?query=1 and other

Submitted by Redfern.89