如何在多行字符串模式匹配?
通过对字符串模式匹配BF和KMP算法的分析,提出了改进KMP扫描算法的方法,并通过对算法的复杂性进行分析,结果表明:改进后的算法KMPA比算法KMP更有效。
KMP scan algorithm is improved by means of the analysis of string pattern matching BF and KMP. The complexity analysis reveals that the improved algorithm, KMPA, is more effective than KMP.
如果您忽略了此参数或传递空字符串,则将使用默认匹配模式。
If you omit this parameter or pass an empty string, the default matching modes are used.
如果使用圆括号将模式元素括起来,您可以在替换字符串中使用匹配的内容。
If you wrap pattern elements in parentheses, you can use the matched contents in the replacement string.
因此,如果文本匹配了整个模式,第一组括号将生成表示一个正整数或负整数的的字符串,例如+49。
Hence, if text matched the entire pattern, the first set of parentheses would yield a string representing a positive or negative integer, such as + 49.
通过使用正则表达式引擎,很容易测试出字符串是否与模式匹配。
Using a regular expression engine, it is easy to test if a string matches the pattern.
在元素中指定模式时,请注意,要使用正则表达式来执行匹配和字符串替换。
When specifying patterns in the element, realize that regular expressions are used to perform the matching and string replacement.
并非确定字符串是否与模式匹配,它有时需要提取每个匹配项。
Rather than determining if a string matches a pattern, it is sometimes desirable to extract every match.
此函数试图匹配并返回正则表达式针对源字符串定义的模式的特定发生项。
This function attempts to match and return a specific occurrence of a pattern that is defined by the regular expression against the source string.
此函数试图匹配正则表达式针对源字符串的模式的特定发生项。
This function attempts to match a specific occurrence of the pattern that is defined by the regular expression against the source string.
确定字符串是否与模式匹配是对正则表达式的最简单应用,如图1所示,而且易于操作。
Determining if a string matches a pattern is the simplest use of regular expressions and, as you see in Figure 1, it's, easy to do.
正则表达式 是定义匹配模式的字符串。
Regular expressions are strings of characters that define a pattern to be matched.
在vi 中,可以使用 /命令搜索字符串,这需要以字面字符串或正则表达式的形式指定要匹配的模式。
You can search for strings in vi using the / command, specifying the pattern to match either as a literal string or as a regular expression.
正则表达式提供了跨文本的字符串的更丰富的模式匹配,但在遍历诸如xml树这样的数据结构时,它和XPath一样易于使用。
Regular expressions provide much richer pattern matching across strings of text, but are as easy to use as XPath when traversing a data structure such as an XML tree.
在matching - substring指令内部,句号(.)表示匹配模式的字符串。
Inside a matching-substring instruction, the period (.) represents the string that matched the pattern.
构建regexp时,这样可帮助在数据集上下文中查看模式与哪些字符串匹配。
When building a regexp, it helps to be able to see what strings the pattern matches in the context of a data set.
与grep不同的是,fgrep搜索的是一个字符串,而不是可以匹配某个表达式的一种模式。
Unlike grep, fgrep searches for a string instead of searching for a pattern that matches an expression. The fgrep utility can be thought of as grep with a few enhancements.
这个语法使用的是PRCE (PerlCompatibleRegularExpressions),一种用来匹配任意目标字符串模式的有效方法。
The syntax USES PRCE (Perl Compatible Regular Expressions), a very powerful way of matching any desired string pattern.
正则表达式(regular expression,regexp)是用于描述字符串集的匹配模式的概念,在很多程序和语言中都是通用的。
The concept of regular expressions (regexps) -a notation for describing a pattern that matches a set of strings-is common across many programs and languages.
它是一种形式模式,一个特定程序使用名为模式匹配的识别流程在文本或字符串中进行查找。
It is a formal pattern that a specific program looks for in text or a string of characters using a recognition process called pattern matching.
即使在这样一小段脚本中,您也可以找到一些参数扩展,包括长度、子字符串、模式匹配和模式替换。
You'll recognize several parameter expansions, including length, substring, pattern matching, and pattern replacement in even this short piece of script.
首先,从最主要的角度来看,函数的目的是“查找与第一个模式中的值匹配的字符串,然后通过将第三个变量作为要操作的字符串,以第二个模式替换匹配结果”。
First, in broadest terms, the function's purpose is to "match what is in the first pattern, then replace it with the second pattern, using the third argument as the string to operate on."
URL模式:与Perl兼容的正则表达式字符串,将与客户端发送的URL进行匹配。
URL pattern: a Perl-compatible regular expression string to be matched with the URL sent by the client.
如果模式与版本字符串模式不相匹配,那么就会创建一条状态信息。
If the pattern does not match the version string pattern, a status message is created.
我用到了模糊字符串匹配、FreeDB检索、ID3版本1和2,以及许多文本模式用户交互。
I used fuzzy string matching, FreeDB searches, ID3 versions 1 and 2, and lots of text-mode user interactions.
评价了字符串是否与预定义的模式相匹配。
Evaluates whether the string matches the predefined pattern.
不仅有字符串精确匹配,udev也允许你使用shell风格的模式匹配。
As well as matching strings exactly, udev allows you to use shell-style pattern matching. There are 3 patterns supported.
这表示“查找子模式的匹配字符串,但不包括反向引用中的匹配结果”。
This means "match a subpattern, but don't include the match in the back-references." So let's examine the subexpression
提出一种高效海量字符串集合的模式匹配算法。
This paper proposes a fast pattern matching algorithm on mass string assemble.
提出一种高效海量字符串集合的模式匹配算法。
This paper proposes a fast pattern matching algorithm on mass string assemble.
应用推荐