嗨,我的environment.ts文件中有一个正则表达式
export const environment = {
passwordPolicy: "^(?!.*(.)\1\1)(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}.*$"
};
但是当我进行ng测试时出现以下错误
ERROR in ./src/environments/environment.ts
Module parse failed: Octal literal in strict mode (74:30)
You may need an appropriate loader to handle this file type.
| passwordPolicy: "^(?!.*(.)\1\1)(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}.*$"
| };
|
@ ./src/app/shared/services/config.service.ts 22:20-64
@ ./src/app/shared/services/users.service.ts
@ ./src/app/shared/services/index.ts
@ ./src/app/users/users.component.spec.ts
@ ./src \.spec\.ts$
@ ./src/test.ts
请帮助我 谢谢