简体   繁体   English

如何在angularjs中使用正则表达式执行否定搜索

[英]How to perform a negative search using regex in angularjs

What I want to achieve is try and perform a negative search on a regex in angularjs e,g. 我想要实现的是尝试在angularjs例如正则表达式中执行否定搜索。 I want to perform a negative search on a hostname that is not 192.1.1. 我想对不是192.1.1。的主机名执行否定搜索。 How do I do this using a custom filter. 如何使用自定义过滤器执行此操作。 Can you provide an example of to use the custom filter in this case – 您能否提供在这种情况下使用自定义过滤器的示例–

use named group. 使用命名组。 For example: 例如:

/[^${192.168.1.1}]/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM