Regexes in Scala translate those capture groups to extractors.
Scala的正则表达式会把这些捕捉组翻译成抽取器。
Regexes can solve simple or difficult text processing problems.
regex可以解决简单或复杂的文本处理问题。
The pre-processor works with a set of regexes (called a ruleset).
预处理程序是用一组正则表达式(称为 规则集(ruleset))。
The important thing is to avoid repeatedly recompiling regexes within loops.
重要的是避免在循环体中重复编译正则表达式。
Using a concise shorthand, regexes describe the form of data and decompose it.
使用简明的简写方式,regex说明了数据的格式并分解数据。
Regexes in Scala should contain no surprises if you've used them in other programming languages.
如果已经在其它编程语言中使用正则表达式,那么Scala的应该不会让你感觉到惊讶。
Commonly referred to as regexes, regular expressions are a feature of nearly all modern programming languages.
正则表达式是几乎所有现代编程语言的共有特性之一,通常被简称为regexes(regex 的复数,Regular Expression 的简称)。
Regexes are not always the best tool for the job, especially when you are merely searching for literal strings.
正则表达式并不总是完成工作的最佳工具,尤其当你只是搜索一个文本字符串时。
Think about the kinds of strings that your regexes will nearly but not quite match, and include those in your tests.
针对你的正则表达式构思一些近似但不能完全匹配的字符串,将他们应用在你的测试中。
However, this proved too complex with long regexes (it was difficult to decide how the group elements related to the regex).
但是,实践证明对于很长的正则表达式这样太复杂了(很难确定group元素与正则表达式的关系)。
Since JRuby aims to be a compatible implementation of Ruby 1.8.x (or future versions), it's necessary to support the same Regexes.
由于JRuby目标是成为与Ruby 1.8 . x(及以后版本)兼容的实现,因此有必要支持同样的正则表达式。
You can concatenate and combine the primitives in Table 1 (and other operators) and use them in combination to build (very) complex regexes.
您可以连接和结合表1中的基本操作符(以及其他操作符)并进行组合来构建(非常)复杂的regex。
Intensive string operations and incautiously crafted regexes can be major performance obstructions, but the advice in this chapter helps you avoid common pitfalls.
密集的字符串操作和粗浅地编写正则表达式可能是主要性能障碍,但本章中的建议可帮助您避免常见缺陷。
Should you find the .r transformation method on strings unclear, you can also define regexes by creating new instances of the Regex class, as in: new Regex("""W""").
如果你觉得字符串的.r转换方法不是很清晰,你也可以通过创建Regex类的实例来定义正则表达式,比如new Regex("""W""")。
Should you find the .r transformation method on strings unclear, you can also define regexes by creating new instances of the Regex class, as in: new Regex("""W""").
如果你觉得字符串的.r转换方法不是很清晰,你也可以通过创建Regex类的实例来定义正则表达式,比如new Regex("""W""")。
应用推荐