You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
329 B
8 lines
329 B
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
|
|
var reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
|
|
|
|
var isUrl = function isUrl(path) {
|
|
return reg.test(path);
|
|
};
|
|
|
|
export default isUrl; |