regex
美
英 
例句
The mode parameter that each of the four regex functions accepts should be a string of up to three characters, out of four possible modes.
四个regex函数中的每个函数可以接受的模式参数都应该是一个最多三个字符的字符串,且不属于四种可能的模式。
It turns out that this smokes the regex competition when there is only a bit of whitespace on the ends of the string.
当字符串末尾只有少量空格时,这种情况使正则表达式陷入疯狂工作。
It should be pretty easy to construct a decent regex now that we've got the structure and special characters down.
在我们了解了它的结构和特殊字符之后,产生一个合适的正则表达式应该就很容易了。
The key to preventing this kind of problem is to make sure that two parts of a regex cannot match the same part of a string.
预防此类问题的关键是确保正则表达式的两个部分不能对字符串的同一部分进行匹配。
When a regex is put to use, the first step is to determine the position within the target string where the search should start.
当一个正则表达式投入使用时,首先要确定目标字符串中开始搜索的位置。
Each time the regex makes such a decision, it remembers the other options to return to later if necessary.
每当正则表达式做出这样的决定,如果有必要的话,它会记住另一个选项,以备将来返回后使用。
Users of your regex will be able to easily understand and modify the pattern to meet their needs.
你的正则的使用者可以方便地明白和修改以达到他们的需求。
The leading and trailing slash shown in the code simply indicate the start and end of the regex.
代码中的首尾斜杠只表示regex的开头和结尾。
Because of the outer loop, the regex essentially advances right to left looking for a digit followed by three digits and a word boundary.
由于是外部循环,因此regex实质上将从右向左前进查找后接三位数和词界的一位数。
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object.
Regex类包含若干静态方法,使您无需显式创建Regex对象即可使用正则表达式。
Because of the outer loop, the regex essentially advances right to left looking for a digit followed by three digits and a word boundary.
由于是外部循环,因此regex实质上将从右向左前进查找后接三位数和词界的一位数。
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object.
Regex类包含若干静态方法,使您无需显式创建Regex对象即可使用正则表达式。
Just put the word regex in brackets ([]) before a string to create a regular expression.
只需要把regex放在中括号里,然后放在一个字符串的前面就可以创建一个正则表达式了。
Each time the regex finds an intermediate tag and exits a lookahead, it throws away all backtracking positions from within the lookahead.
正则表达式每次找到一个中间标签就退出一个前瞻,它在前瞻过程中丢弃所有回溯位置。
To validate such a user name, say, in a Web form submitted to your server, you might use a regex such as ^[A-Za-z].
假定要在提交给您的服务器的Web表格中验证这样的用户名,可以使用类似于^[A-Za-z]的regex。
We can now see that our regex has turned into a simple "program" that will be executed later.
可以看到,正则表达式已经被转化为一个稍后可供运行的简单“程序”。
In programming, a regular expression is written in a formal language, also known as regex or regexp.
在编程中,正则表达式是用一种形式语言编写的,也称为regex或regexp。
The Test Rule section of the RegEx editor, which is shown in Figure 6, is used to test your rule on a set of sample text snippets.
使用RegEx编辑器的TestRule部分(见图6)在一组示例文本片段上测试规则。
A new filler element contains portions of the regex that are not in a group (that is, they do not generate XML tags).
一个新的filler元素包含不属于组的那部分正则表达式(即不生成XML标签)。
Other switches allow you to limit indexing to only add files whose name matches a pattern (either regex or glob).
其它开关允许您将索引限于只添加其名称与模式(regex或glob)匹配的文件。
This is similar to the last regex, but it replaces the lazy quantifier with a greedy one for performance reasons.
这个表达式与上一个很像,但出于性能原因以贪婪量词取代了懒惰量词。
Some people go overboard, using regex caching schemes that aim to avoid ever compiling a given pattern and flag combination more than once.
有人做的太过火,使用正则表达式缓存池,以避免对给定的模板和标记组合进行多次编译。
Consult references on those APIs for the hairy details, as they may be subtly different than the regex support in your language of choice.
参考这些API的文档来获取详细信息,不同语言之间可能会存在微妙的差别。
That's because looping over characters to check whether they are whitespace can't match the efficiency of a regex's optimized search code.
因为循环检查字符是不是空格在效率上不如正则表达式所使用的优化过的搜索代码。
Given a regex and a datum, a regex engine yields whether the datum matches a pattern and, if a match was found, what matched.
给定一个正则表达式和数据,正则表达式引擎将得到数据是否匹配模式及匹配内容(如果找到匹配)等结果。
This attribute must be a regular expression that works with the Regex class.
该属性必须是可用于Regex类的正则表达式。
Techniques like content-based filters (XPath or Regex) can then be used to selectively apply policies to particular messages.
然后,可以使用诸如基于内容的筛选(XPath或者Regex)之类的技术,以便有选择地将这些策略应用于特定的消息。
However, this proved too complex with long regexes (it was difficult to decide how the group elements related to the regex).
但是,实践证明对于很长的正则表达式这样太复杂了(很难确定group元素与正则表达式的关系)。
Using a concise shorthand, regexes describe the form of data and decompose it.
使用简明的简写方式,regex说明了数据的格式并分解数据。
For a full description of POSIX regular expressions see the regex man pages included in the regex directory in the PHP distribution.
POSIX正则表达式完整的描述见包含在PHP发行包中regex目录下的man页面。
Techniques like content-based filters (XPath or Regex) can then be used to selectively apply policies to particular messages.
然后,可以使用诸如基于内容的筛选(XPath或者Regex)之类的技术,以便有选择地将这些策略应用于特定的消息。
However, this proved too complex with long regexes (it was difficult to decide how the group elements related to the regex).
但是,实践证明对于很长的正则表达式这样太复杂了(很难确定group元素与正则表达式的关系)。
Using a concise shorthand, regexes describe the form of data and decompose it.
使用简明的简写方式,regex说明了数据的格式并分解数据。
For a full description of POSIX regular expressions see the regex man pages included in the regex directory in the PHP distribution.
POSIX正则表达式完整的描述见包含在PHP发行包中regex目录下的man页面。
The following code example creates an instance of the Regex class and defines a simple regular expression when the object is initialized.
下面的代码示例创建了Regex类的实例并在初始化对象时定义一个简单的正则表达式。
Indicates whether the regular expression specified in the Regex constructor finds a match in the input string.
指示Regex构造函数中指定的正则表达式在输入字符串中是否找到匹配项。
Here, the regex is simply , (a comma, the eponymous delimiter of a comma-separated list).
在这里,regex只是,(一个逗号,以逗号分隔的列表中的分隔符)。
Just keep in mind that you need to use the appropriate back reference number if your regex contains more than one capturing group.
只要记住,你需要使用适当的后向引用次数如果你的正则表达式包含多个捕获组。
If the specified mode is incorrect, any of the regex functions will return an error.
如果指定的模式不正确,所有regex函数都将返回错误。
If your input spans multiple lines, a typical regex won't suffice because scanning terminates at a newline, denoted by $.
如果输入跨度多行,则使用典型的regex是不够的,因为扫描将在$所指示的换行符处终止。