📅  最后修改于: 2022-03-11 15:04:00.638000             🧑  作者: Mango
const reg = '(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?'; this.form = fb.group({ url: ['', [Validators.required, Validators.pattern(reg)]]})