过滤器+ REGEXMATCH+ Regexreplace在案例敏感分析中包括所有特殊角色

发布于 2025-02-11 01:34:55 字数 644 浏览 3 评论 0原文

如果特定特殊字符可以添加如下:

=FILTER(D1:D, REGEXMATCH(D1:D, "^("&REGEXREPLACE(TEXTJOIN("|", 1, A:A),"([().])","\\$1")&")$")=FALSE)

但是,当想要分析所有特殊字符时,最好的方法是负面匹配,获取azaz0-9的所有不同值。

因此,我试图以直接添加的直接添加来重现它,但是当匹配值时,它将匹配的数量返回到零:

=FILTER(D1:D, REGEXMATCH(D1:D, "^("&REGEXREPLACE(TEXTJOIN("|", 1, A:A),"([^A-Za-z0-9])","\\$1")&")$")=FALSE)

在这种情况下,正确的方法是什么?

In cases specific special characters could be added as follows:

=FILTER(D1:D, REGEXMATCH(D1:D, "^("®EXREPLACE(TEXTJOIN("|", 1, A:A),"([().])","\\$1")&")
quot;)=FALSE)

But when wanting to analyze all of them, the best approach would be a negative match, fetching all the different values of A-Z, a-z, and 0-9.

So, I tried to reproduce it with a direct addition that finds the values but when matching the values, it returns the number of matches to zero:

=FILTER(D1:D, REGEXMATCH(D1:D, "^("®EXREPLACE(TEXTJOIN("|", 1, A:A),"([^A-Za-z0-9])","\\$1")&")
quot;)=FALSE)

What is the correct approach in this case?

Google Sheets data with expected result

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2025-02-18 01:34:55
=FILTER(D1:D, 
  REGEXMATCH(D1:D, 
    "^("&TEXTJOIN("|", 1, 
      REGEXREPLACE(A:A,"[.*+?^${}()|[\]\\]","\\$0"))&")$")=FALSE)

[。

所有特殊

字符的正则表达式: -us/doc/web/javascript/guide/pruard_expressions#逃脱“ rel =” nofollow noreferrer“>逃脱

=FILTER(D1:D, 
  REGEXMATCH(D1:D, 
    "^("&TEXTJOIN("|", 1, 
      REGEXREPLACE(A:A,"[.*+?^${}()|[\]\\]","\\$0"))&")
quot;)=FALSE)

Regular expression of all special characters: [.*+?^${}()|[\]\\]

Reference:

Escaping

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文