如何在angular 4 typescript上导入RegExp

如何在angular 4 typescript上导入RegExp,regex,angular6,Regex,Angular6,导入不起作用。它的意思是找不到模块。数组的第一项缺少一个结尾“') import RegExp from "typescript-dotnet-commonjs/System/Text/RegularExpressions"; @Injectable() export class TokenInterceptor implements HttpInterceptor { private whiteList = [ new RegExp('http://localhost

导入不起作用。它的意思是找不到模块。

数组的第一项缺少一个结尾“')

import RegExp from "typescript-dotnet-commonjs/System/Text/RegularExpressions";

@Injectable()
export class TokenInterceptor implements HttpInterceptor {
    private whiteList = [
        new RegExp('http://localhost:8081/app2/oauth-server/oauth/token',
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/signup'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/registeration/confirm/.*'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/user/profile/upload'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/profile/edit/password/.*')
    ]}

谢谢,但问题不在于这个。问题在于RegExp上的导入。
import RegExp from "typescript-dotnet-commonjs/System/Text/RegularExpressions";

@Injectable()
export class TokenInterceptor implements HttpInterceptor {
    private whiteList = [
        new RegExp('http://localhost:8081/app2/oauth-server/oauth/token'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/signup'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/registeration/confirm/.*'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/user/profile/upload'),
        new RegExp('http://localhost:8082/app/oauth-resource/ibex/api/profile/edit/password/.*')
    ]}