Understanding the preg_match() function pattern

It looks like the pattern is trying to match a url starting with http(s)://, ftp://, or www. It also looks like if the string starts with http or ftp, it will catch the www. If this doesn’t help, please enlighten us on what exactly you don’t understand.