regex

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.

编程表达式一种形式语言编写称为regexregexp

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).

其它开关允许索引限于添加名称模式regexglob匹配文件

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不够因为扫描$指示终止

热门查询