私は、URLを検証するための '防弾'プレグ式を探しています。 正規表現は、以下のアドレス URLを検証するためのpreg
ftp://[email protected] http://hh-1hallo.msn.blabla.com:80800/test/test/test.aspx?dd=dd&id=dki http://twitter.com/test http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd telnet://example.org:8888 http://www.google.com/search?q=good+url+regex&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1 ftp://joe:[email protected] https://some-url.com?query=&name=joe?filter=*.*#some_anchorのために真でなければなりません。しかし、以下にfalseを返す必要があります:
http .org /TR/xhtml1/DTD/xhtml1-transitional.dtd
http://hh-1hallo. msn.blablabla.com:80800/test/test.aspx?dd=dd&id=dki
google.com
example.org
ちょうどあなたが望むものを検証する正規表現を追加しました – VonC