参考-这个regex是什么意思?

时间:2021-03-13 22:29:24

What is this?

This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it.

这是一组常见的问答。这也是一个社区维基,所以每个人都被邀请来维护它。

Why is this?

is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to quality Q&A.

regex正在遭受这样的问题:给我ze代码类型的问题和糟糕的答案,没有任何解释。本参考资料旨在提供质量问答的链接。

What's the scope?

This reference is meant for the following languages: , , , , , , .

此引用用于以下语言:php、perl、javascript、python、ruby、java、.net。

This might be too broad, but these languages share the same syntax. For specific features there's the tag of the language behind it, example:

这可能太宽泛了,但是这些语言具有相同的语法。对于特定的特性,它后面有语言的标记,例如:

  • What are regular expression Balancing Groups?
  • 什么是正则表达式平衡组?net

1 个解决方案

#1


672  

The Stack Overflow Regular Expressions FAQ


Online tutorials

在线教程

Quantifiers

量词

Character Classes

字符类

Escape Sequences

转义序列

Anchors

(Also see "Flavor-Specific Information → Java → The functions in Matcher")

(也看到“Flavor-Specific信息→Java→匹配器”功能)

Groups

Lookarounds

看看

Modifiers

修饰符

Other:

其他:

Common Tasks

常见的任务

Advanced Regex-Fu

先进Regex-Fu

Flavor-Specific Information

Flavor-Specific信息

(Except for those marked with *, this section contains non-Stack Overflow links.)

(除标有*的外,本节包含非堆栈溢出链接。)

  • Java
  • Java官方文档:Pattern Javadoc, Oracle的正则表达式教程,介绍Java .util.regex中的函数之间的差异。Matcher: matches(): match必须同时锚定到input-start和-end find(): match可能位于输入字符串(子字符串)lookingAt()中的任何位置:匹配必须锚定到仅用于input-start(对于一般锚点,请参见“anchor”一节)的惟一java.lang。接受正则表达式的字符串函数:matches(s)、replaceAll(s,s)、replaceFirst(s,s)、split(s)、split(s,i) *An (opinionated and)详细讨论了java.util.regex中特性的缺点和缺失
  • .NET
  • .NET如何通过查找、查找、捕获组和反向引用来读取。net regex ?
  • Official documentation:
  • 官方文档:Boost regex引擎:通用语法、Perl语法(用于TextPad、崇高文本、超文本、…??)JavaScript 1.5一般信息和RegExp对象。net MySQL Oracle Perl5版本18.2 PHP:模式语法、preg_match Python:正则表达式操作、搜索vs匹配、如何操作Splunk: regex术语和语法和regex命令Tcl: regex语法、manpage、RegExp命令Visual Studio查找和替换。

General information

一般信息

(Links marked with * are non-Stack Overflow links.)

(标有*的链接是非堆栈溢出链接。)

Examples of regex that can cause regex engine to fail

regex的例子可能导致regex引擎失败

Tools: Testers and Explainers

工具:测试人员和讲解员

(This section contains non-Stack Overflow links.)

(此部分包含非堆栈溢出链接。)

#1


672  

The Stack Overflow Regular Expressions FAQ


Online tutorials

在线教程

Quantifiers

量词

Character Classes

字符类

Escape Sequences

转义序列

Anchors

(Also see "Flavor-Specific Information → Java → The functions in Matcher")

(也看到“Flavor-Specific信息→Java→匹配器”功能)

Groups

Lookarounds

看看

Modifiers

修饰符

Other:

其他:

Common Tasks

常见的任务

Advanced Regex-Fu

先进Regex-Fu

Flavor-Specific Information

Flavor-Specific信息

(Except for those marked with *, this section contains non-Stack Overflow links.)

(除标有*的外,本节包含非堆栈溢出链接。)

  • Java
  • Java官方文档:Pattern Javadoc, Oracle的正则表达式教程,介绍Java .util.regex中的函数之间的差异。Matcher: matches(): match必须同时锚定到input-start和-end find(): match可能位于输入字符串(子字符串)lookingAt()中的任何位置:匹配必须锚定到仅用于input-start(对于一般锚点,请参见“anchor”一节)的惟一java.lang。接受正则表达式的字符串函数:matches(s)、replaceAll(s,s)、replaceFirst(s,s)、split(s)、split(s,i) *An (opinionated and)详细讨论了java.util.regex中特性的缺点和缺失
  • .NET
  • .NET如何通过查找、查找、捕获组和反向引用来读取。net regex ?
  • Official documentation:
  • 官方文档:Boost regex引擎:通用语法、Perl语法(用于TextPad、崇高文本、超文本、…??)JavaScript 1.5一般信息和RegExp对象。net MySQL Oracle Perl5版本18.2 PHP:模式语法、preg_match Python:正则表达式操作、搜索vs匹配、如何操作Splunk: regex术语和语法和regex命令Tcl: regex语法、manpage、RegExp命令Visual Studio查找和替换。

General information

一般信息

(Links marked with * are non-Stack Overflow links.)

(标有*的链接是非堆栈溢出链接。)

Examples of regex that can cause regex engine to fail

regex的例子可能导致regex引擎失败

Tools: Testers and Explainers

工具:测试人员和讲解员

(This section contains non-Stack Overflow links.)

(此部分包含非堆栈溢出链接。)