2017-03-14 70 views

回答

0

這應該訣竅

['field', 'match', 'pattern' => '/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w][email protected])?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w][email protected])[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/i', 'not'=>true] 

正則表達式將m ATCH網址像

Regex example

你希望只允許characte