关键词不能为空

当前您在: 主页 > 英语 >

labview的正则表达式语法 来自labview的帮助

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-02 11:10
tags:

-

2021年2月2日发(作者:hertz)


Special Characters for Match Regular Expression(


正则表达式


) and Search and


Replace String


Use these special characters in the


regular expression


input of the


Match Regular Expression


and


Search


and Replace String


functions. Right-click the Search and Replace String function and select


Regular


Expression


from the shortcut menu to configure the function for advanced regular expression searches and


partial match substitution in the replacement string.


Resize


the Match Regular Expression function to view


any partial matches found in the string. You can use the


Match Pattern


function or the Match Regular


Expression function to search strings for regular expressions. The Match Regular Expression function gives


you more options for matching strings but performs more slowly than the Match Pattern function.



Note


The Match Regular Expression function does not support null characters in strings. Also, a


pattern can return a successful match of an empty string. If a pattern does not return a successful



match, the


offset past match


will return



1.


Regular expression support is provided by the


PCRE library package


. The license under which the PCRE


library package is redistributed can be found on the


Copyright


page at


Important Information?


Copyright



on the


Contents


tab.


Refer to the PCRE Web site at for more information about Perl Compatible Regular


Expressions.


Special


Character


.


Interpreted As


Matches any single character except a newline character. For example, .t matches at, bt, 2t, _t,


and so on.


Marks part of a pattern as one that can appear zero or more times in the input. For example,


be* marks e as a pattern that can appear 0 or more times. Therefore, be* matches be in believe,


bee in beep, and b in bat. In the last example, the e* did not match a character, but the whole


match still succeeded. This can be a problem if the whole pattern is marked with an asterisk.


For example, the pattern b* matches b in baac. The pattern b*, however, also matches an


empty string or abbc, returning a successful match with


whole match


returning an empty


string.


Marks part of a pattern as one that can appear one or more times in the input. For example, be+


matches be in believe, bee in beep, and fails (no match) with bat.


Marks part of a pattern as one that can appear zero or one time in the input. For example, be?


matches be in believe, be in bee, be in beep, and b in bat.


Marks a part of a pattern as one that can appear an arbitrary number of times in a specific


range. For example, be{2} matches b followed by at least two e characters. be{0,3} matches b


followed by at most three e characters. be{2,3} matches b followed by at least two, but at most


three e characters.


Creates character classes, which allow you to match any one of a set of characters. For


example, [abc123] matches the characters a, b, c, 1, 2, or 3.



*


+


?


{ }


[]


-


Specifies a range of characters. For example, [a-z] matches any lowercase letter. [a-zA-Z0-9]


matches any lowercase or uppercase letter or any digit.




You also can use a character class to match any character not in a given set by adding a caret


(^) to the beginning of the class. For example, [^0-9] matches any character that is not a digit.


[^a-zA-Z0-9] matches any character that is not a lowercase or uppercase letter and also not a


digit.


Indicates partial matches. Separate possible matches in a regular expression with a horizontal


bar (|). For example, (cat|dog) catcher matches cat catcher or dog catcher and remembers the


first part of the match (cat or dog) in the first partial match.



You also can use multiple partial matches.



For example, (a|the) (cat|dog) matches a cat, a dog, the cat, or the dog and remembers the first


word (a or the) in the first partial match and the second word (cat or dog) in the second partial


match.



((fire|police)(wo)?man) Smith matches fireman Smith, policeman Smith, firewoman Smith, or


policewoman Smith. partial match 1 is fireman, policeman, firewoman, or policewoman;


partial match 2 is fire or police; and partial match 3 is


because the ? indicates that wo can appear 0 or one times) or wo (indicating a woman).


Indicates multiple possible matches. For example, cat|dog matches cat in catcher or dog in big


dog.


Anchors a match to the beginning of a string. For example, ^dog matches dog in dog catcher


but not the dog.


Anchors a match at the end of a string when used as the last character of a pattern. For


example, dog$$ matches dog in the dog but not dog catcher.


Cancels the interpretation of any special character in this list.



The following escaped expressions have special meanings:



?



( )


|


^


$$



?



?



?



?



?



?



?



b - Represents a word boundary. A word boundary is a character that is not a word


character adjacent to a character that is a word character and vice versa. A word


character is an alphanumeric character or an underscore (_). For example, bhat


matches hat in hatchet but not in that. hatb matches hat in that but not in hatchet.


bhatb matches hat in hat but not in that or hatchet.



c - Matches any control or non-printing character; includes any code point in the


character set that does not represent a written symbol



w - Matches any word character; equivalent to [a-zA-Z0-9_]



W - Matches any non-word character; equivalent to [^a-zA-Z0-9_]



d - Matches any digit character; equivalent to [0-9]



D - Matches any non-digit character; equivalent to [^0-9]



s - Matches any white space character; includes space, newline, tab, carriage return,


and so on



S - Matches any non-white space character


-


-


-


-


-


-


-


-



本文更新与2021-02-02 11:10,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/599256.html

labview的正则表达式语法 来自labview的帮助的相关文章

  • 爱心与尊严的高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊严高中作文题库

    1.关于爱心和尊严的作文八百字 我们不必怀疑富翁的捐助,毕竟普施爱心,善莫大焉,它是一 种美;我们也不必指责苛求受捐者的冷漠的拒绝,因为人总是有尊 严的,这也是一种美。

    小学作文
  • 爱心与尊重的作文题库

    1.作文关爱与尊重议论文 如果说没有爱就没有教育的话,那么离开了尊重同样也谈不上教育。 因为每一位孩子都渴望得到他人的尊重,尤其是教师的尊重。可是在现实生活中,不时会有

    小学作文
  • 爱心责任100字作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任心的作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文
  • 爱心责任作文题库

    1.有关爱心,坚持,责任的作文题库各三个 一则150字左右 (要事例) “胜不骄,败不馁”这句话我常听外婆说起。 这句名言的意思是说胜利了抄不骄傲,失败了不气馁。我真正体会到它

    小学作文