ng-pattern with regex having double quotes does not escape correctly

后端 未结 3 1465
后悔当初
后悔当初 2021-01-18 20:36

I have a ng-pattern validation for a regex of ^[^\\./:*\\?\\\"<>\\|]{1}[^\\/:*\\?\\\"<>\\|]{0,254}$ which basically tests the invalid chars in filepath and teh limit.

3条回答
  •  轮回少年
    2021-01-18 21:00

    I was trying to exclude ' and " in a ng-pattern which is similar to the problem above. I found a way to embed ' or " directly without having to use a scope variable:

提交回复
热议问题