OK, now on to the second regexp.
好,现在看一下第二个regexp。
Step 2: Compile the regexp pattern.
第 2步:编译regexp模式。
Common regexp modifiers are provided in Table 1.
表1给出了常用的regexp修饰符。
Notice that you have to quote the regexp now.
请注意,现在必须给 regexp加上引号。
You can often see right away if your regexp needs fixing.
如果regexp需要进行调整,通常就可以立即发现。
Suppose that you always use JDK 1.4's built-in regexp classes.
假定您一直在使用JDK 1.4的内置regexp类。
You can test the regexp you've just built, as shown in Listing 13.
现在可以对刚刚构建的regexp 进行测试,如清单13 中所示。
So, this regexp is equivalent to: Take the first text that precedes a space.
因此,该regexp相当于:取空格前的第一段文本。
But which characters exactly on those lines of input did the regexp match?
但具体是这些行中的哪些字符与regexp匹配呢?
You can also do regexp highlighting in sed, the stream editor. The sed command.
还可以在sed(流编辑器,stream editor)中进行regexp突出显示。
The core of this tag relies on Apache's regexp library to validate input values.
这个标签的核心依赖于Apache的regexp库对用户输入的值进行有效性验证。
A lot of tools and methods are available on UNIX systems for regexp building.
UNIX系统上提供了大量的工具和方法来构建regexp。
With this Jacl version, the regexp command supports only TCL 8.0 regexp command syntax.
通过这个版本的Jacl,regexp命令仅仅支持tcl 8.0 regexp命令语法。
However, if the regexp itself is not fixed, then the compilation process cannot be skipped.
但是,如果regexp本身不固定,则不能忽略编译过程。
Up till now, we've taken a look at line addresses, line range addresses, and regexp addresses.
目前为止,我们已经看到了行地址、行范围地址和regexp 地址。
The team has spent time and money to learn and rewrite the code so it USES the regexp library.
团队已花费时间和财力来学习并重新编写代码,以使它使用regexp库。
In the regexp world, there are some compiler options supported by only certain implementations.
在regexp领域中,一些编译器选项仅被某些实现支持。
In programming, a regular expression is written in a formal language, also known as regex or regexp.
在编程中,正则表达式是用一种形式语言编写的,也称为regex或regexp。
It outputs a regexp for one of several common patterns that are given as arguments, as listed in Table 2.
它可以输出作为参数给出的多个常见模式之一的regexp,如表2中所示。
I start with a very simple regexp: Imagine that the text you have to parse is just the name of a person.
我从一个非常简单的regexp开始:假定您必须要解析的文本只是人名。
Input files contain a regexp to test on a single line followed by any number of lines of data to test.
输入文件中包含用于测试单行(其后跟着多行待测试数据)的regexp。
When building a regexp, it helps to be able to see what strings the pattern matches in the context of a data set.
构建regexp时,这样可帮助在数据集上下文中查看模式与哪些字符串匹配。
For example, you can use this to get a ready regexp for any valid hour in military time, as shown in Listing 15.
例如,你可以使用此工具来获取用于军事时间中任意有效时间的现成regexp,如清单15中所示。
For example, grep, sed, and other tools like them have man pages that describe their regexp syntax and give examples.
例如,grep、sed和其他类似的工具都提供了手册页,描述其regexp语法并提供相关示例。
The isearch-forward-regexp and isearch-backward-regexp functions are typically bound to the M-S-s and M-S-r keystrokes.
isearch-forward-regexp和 isearch-backward-regexp功能通常绑定到 M-S-s 和 M-S-r 键盘输入。
Some of the newer versions of grep (such as GNU grep) highlights the regexp in color when you use the --color option, as shown in Figure 1.
一些较新版本的grep(如GNU grep )可在使用 --color选项时用颜色突出显示regexp,如 图 1 中所示。
Say you want to output all the words in the test file containing the string th, and you've built the regexp shown in Listing 5 to do that.
假定希望输出测试文件中包含字符串th 的所有单词,则构建清单5 中所示的regexp 进行此工作。
As you go through the procedure, txt2regex builds the regexp for each of the three chosen applications and displays them near the top of the screen.
在进行此工作的过程中,txt2regex将为所选择的三个应用程序分别构建regexp,并将其显示在屏幕顶部。
These various regexp implementations differ to some degree in the finery of their details, but the principles for learning to build regexps are common for all.
这些不同的regexp实现在其细节方面存在一些差别,但构建regexp的原则全部都是通用的。
This is because of GWT's reliance on the host environment's underlying regexp mechanism and is an example of the trouble that imperfect abstractions can land you in.
这是因为GWT对宿主环境底层的正则表达式机制的依赖也是不完美抽象所带来问题的一个例子。
应用推荐