这真的是要逃避在正则表达式模式中?
Is it really required to escape back slashes in regex patterns?
在正则表达式的上下文中,模式是字符序列的文本表示法。
In the context of regular expressions, patterns are text representations of sequences of characters.
这允许在解析时在正则表达式中使用十六进制值。
This allows hexadecimal values in regular expressions when parsing.
在正则表达式中,一个常规字符是一个原子,它表示只包含其自身的单字符串集。
In regular expressions, a normal character is an atom that denotes the singleton set of strings containing only itself.
甚至存在几种方式可以在正则表达式内嵌入注释来让正则表达式本身更加的文档化。
There are even ways of embedding comments within regular expressions to make them practically self-documenting.
这个概要(见图15)还显示,相当多的时间花费在正则表达式的处理上,因此,您还应该缓存解析结果。
The profile (Figure 15) also shows that quite a lot of time is being spent in regular expression processing, so you should also cache the parsing results.
这类似于我们在正则表达式中使用“捕捉组”来提取我们需要的子字符串时来替代把一个字符串分隔成好几个的方法。
It is analogous to using "capture groups" in a regular expression to pull out substrings we want, instead of splitting the string in several successive steps to extract the substrings we want.
当我开始寻找算法时,我看了在特定上下文(正则表达式)中的一些示例,而且尝试了将它们与一个完全不同的上下文相匹配。
When I set out looking for an algorithm, I looked at examples in a specific context (regular expression) and I attempted to match them to a completely different context.
在命令行中,正则表达式的作用相当于形容词——一种描述或限定词。
On the command line, the regular expression ACTS as an adjective — a description or qualifier.
在清单2中,通过包含正则表达式的简单的名称列表可以检测一些国家。
In Listing 2, a few countries are detected through a simple list of names that comprise the regular expression.
不幸的是,抽象是有漏洞的:例如,在我的ZIP代码验证器中,本想使用正则表达式执行检测。
Unfortunately, the abstraction is leaky: in my ZIP code validator, for example, I would have liked to use regular expressions to perform the check.
这一集成的基础是谓词匹配,它允许正则表达式在一个属性(或所有属性)之上匹配。
The cornerstone is the predicate matches, which allow for a regular expression match over an attribute (or all the attributes).
因此在实际中,我使用一个正则表达式解析来为我提供所需要的细节信息。
In practice, therefore, I use a sliver of regular expression parsing to give me just the details I'm after.
第一步是创建与每个查询词一致的正则表达式,只有在查询词包含通配符 * 时才需要修改。
The first step is to create a compatible regular expression out of each query word, although modification is only required if the word contains a wildcard character: *.
路由在模式匹配时使用正则表达式,并且使用XML表示。
Routes make use of regular expressions for pattern matching, and are expressed using XML.
在命令行中,可以采用许多方法使用正则表达式。
At the command line, you'll find many ways to use regular expressions.
正则表达式在JD K 1.4版本中引入,是许多应用程序中广泛使用的一个功能。
Regular expressions, introduced into the JDK in version 1.4, are a widely used feature in many applications.
这个正则表达式在元素中指定。
正则表达式在计算机语言理论中有很长的历史。
Regular expressions have their roots in computer language theory.
在您学会正则表达式的语法(也许相当晦涩)之后,就可以将您的专业知识灵活运用到不同的工具、编程语言和操作系统。
Once you learn the (admittedly cryptic) syntax of regular expressions, you can transfer your expertise among tools, programming languages, and operating systems.
我还会使用Groovy的正则表达式(在感受Groovy中介绍)来确定传递给facade的消息。
I'll also be using Groovy's regular expressions (introduced in Feeling Groovy) to determine the messages passed to the facade.
在Rule部分的input框中输入以下正则表达式模式。
Enter the following regular expression pattern into the input field of the Rule section.
在需要时,Perl6正则表达式可以被复用。
在Perl6正则表达式和语法中,有Perl5和P:RD所没有提供的其他有趣特性。
There are other interesting features in the Perl 6 regular expressions and grammars, which Perl 5 and p: : RD do not offer.
在清单1中,一旦将正则表达式编译成Pattern,它就创建了带matcher方法的matcher。
In Listing 1, once a regular expression is compiled into a Pattern, it creates a matcher with the matcher method.
在Perl6正则表达式之上与其紧密集成的是Perl 6语法。
On top of the Perl 6 regular expressions, and tightly integrated with them, are the Perl 6 grammars.
正则表达式:搜索单词将作为一个正则表达式(在关键字搜索中,单词被视为正则表达式系列)。
Regular expressions: search word (s) will be regarded as a regular expression (in keyword search words will be treated as a sequence of regular expressions).
构建的正则表达式要求在构建的表达式末尾有一个词界以确保此行为。
The regular expression built requires a word boundary at the end of the built expression to ensure this behavior.
在应用到输出时,正则表达式可辨别相关数据和无关数据。
When applied to output, the regular expression discerns between relevant data and craft.
在应用到输出时,正则表达式可辨别相关数据和无关数据。
When applied to output, the regular expression discerns between relevant data and craft.
应用推荐