它使用Scala的模式匹配。
就可以排除与这些模式匹配的所有文件
you can exclude all files that match any of those patterns with
XSLY 的秘诀:模式匹配
利用模式匹配构建xml。
规则引擎可以使用多种算法执行模式匹配。
There are a number of algorithms used for pattern matching by rules engines.
为变量赋值实际上就是一种特殊的模式匹配。
Assigning values to variables is actually a special type of pattern matching.
清单11给出了模式匹配扩展的一些基本用法。
Listing 11 shows some basic usage of the pattern matching expansions.
这对于验证输入或分隔与模式匹配的文档很有用。
This is useful for validating input or for splitting a document where the pattern matches.
这两个文件中的模式匹配规则控制拒绝或允许什么。
Rules to pattern matching in both these files will control what gets denied or allowed.
接下来两行用模式匹配摘出实施规则所必需的数据。
The next two lines use pattern matching to pick off the values required to enforce this rule when the returned function is actually executed.
引擎从第一条规则开始,查找与输入模式匹配的规则。
The engine starts from the first rule and looks for the rule that matches the input pattern.
内置的操作符使得文本搜索、替换和模式匹配轻而易举。
The built-in operators make text searching, replacing, and pattern matching effortless.
考虑到相同的代码量,使用模式匹配的价值体现在哪里?
Given that both weigh in at about the same number of lines of code, where is the value of using pattern matching?
在这个示例中,使用模式匹配提取列表的开头和结尾部分。
In that example, pattern matching was used to extract both the head and the tail of the list.
这个字面函数给消息做了一个模式匹配来决定它被如何处理。
This function literal does a pattern match on the message instance to decide how to handle the message.
我们大脑是模式匹配机器,因此我们更容易注意到这样的模式。
Our brains are just pattern matching machines, so we tend to notice patterns like that.
活动模式的思想就是让你能把模式匹配语法用于其他数据结构。
The idea of active patterns is to enable you to use the pattern matching syntax with other data structures.
并非确定字符串是否与模式匹配,它有时需要提取每个匹配项。
Rather than determining if a string matches a pattern, it is sometimes desirable to extract every match.
路由在模式匹配时使用正则表达式,并且使用XML表示。
Routes make use of regular expressions for pattern matching, and are expressed using XML.
本教程也假设您理解开发人员测试的价值,并熟悉基本模式匹配。
This tutorial also assumes that you understand the value of developer testing and are familiar with basic pattern matching.
通过使用正则表达式引擎,很容易测试出字符串是否与模式匹配。
Using a regular expression engine, it is easy to test if a string matches the pattern.
最后,当设计模式匹配指令时,对于默认case的依赖要小心。
Finally, when designing pattern matching statements, be wary of relying on a default case clause.
当前的XSL标准使用XPath技术来执行它所有的模式匹配。
The current XSL standard USES the XPath technology to perform all of its pattern matching.
例如,可以使用一个模式匹配同时为两个变量赋值(参见清单31)。
For example, we can assign values to two variables simultaneously with one pattern matching (see Listing 31).
成功使用套筒扳手的关键在于模式匹配:套筒扳手必须与螺母相匹配。
The key to success with a socket wrench is pattern matching: The socket must match the nut.
模式匹配操作可能是非常昂贵的,因此智能地集中搜索是非常重要的。
The pattern matching operation is potentially expensive, so it is vital to focus the search intelligently.
相反地,在你需要通过可控方式获取信息的时候,考虑使用模式匹配。
Instead, consider using pattern matching for those "rare" times when you need to extract information in a controlled way.
模式匹配是从函数式语言中引入的强大而简洁的多条件选择跳转方式。
An idea borrowed from functional languages, pattern matching is a powerful yet concise way to make a programmatic choice between multiple conditions.
这些技术都是基于模式匹配和事件定义的,可以是空间上的或时间上的。
These techniques are based on pattern matching and event definitions and can be spatial or temporal.
模式匹配在使用恰当时是一个强大的,优雅的从对象中抽取信息的方式。
Pattern matching is a powerful and elegant way of extracting information from objects, when used appropriately.
应用推荐