亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? perlrequick.pod

?? MSYS在windows下模擬了一個類unix的終端
?? POD
?? 第 1 頁 / 共 2 頁
字號:
=head1 NAMEperlrequick - Perl regular expressions quick start=head1 DESCRIPTIONThis page covers the very basics of understanding, creating andusing regular expressions ('regexes') in Perl.=head1 The Guide=head2 Simple word matchingThe simplest regex is simply a word, or more generally, a string ofcharacters.  A regex consisting of a word matches any string thatcontains that word:    "Hello World" =~ /World/;  # matchesIn this statement, C<World> is a regex and the C<//> enclosingC</World/> tells perl to search a string for a match.  The operatorC<=~> associates the string with the regex match and produces a truevalue if the regex matched, or false if the regex did not match.  Inour case, C<World> matches the second word in C<"Hello World">, so theexpression is true.  This idea has several variations.Expressions like this are useful in conditionals:    print "It matches\n" if "Hello World" =~ /World/;The sense of the match can be reversed by using C<!~> operator:    print "It doesn't match\n" if "Hello World" !~ /World/;The literal string in the regex can be replaced by a variable:    $greeting = "World";    print "It matches\n" if "Hello World" =~ /$greeting/;If you're matching against C<$_>, the C<$_ =~> part can be omitted:    $_ = "Hello World";    print "It matches\n" if /World/;Finally, the C<//> default delimiters for a match can be changed toarbitrary delimiters by putting an C<'m'> out front:    "Hello World" =~ m!World!;   # matches, delimited by '!'    "Hello World" =~ m{World};   # matches, note the matching '{}'    "/usr/bin/perl" =~ m"/perl"; # matches after '/usr/bin',                                 # '/' becomes an ordinary charRegexes must match a part of the string I<exactly> in order for thestatement to be true:    "Hello World" =~ /world/;  # doesn't match, case sensitive    "Hello World" =~ /o W/;    # matches, ' ' is an ordinary char    "Hello World" =~ /World /; # doesn't match, no ' ' at endperl will always match at the earliest possible point in the string:    "Hello World" =~ /o/;       # matches 'o' in 'Hello'    "That hat is red" =~ /hat/; # matches 'hat' in 'That'Not all characters can be used 'as is' in a match.  Some characters,called B<metacharacters>, are reserved for use in regex notation.The metacharacters are    {}[]()^$.|*+?\A metacharacter can be matched by putting a backslash before it:    "2+2=4" =~ /2+2/;    # doesn't match, + is a metacharacter    "2+2=4" =~ /2\+2/;   # matches, \+ is treated like an ordinary +    'C:\WIN32' =~ /C:\\WIN/;                       # matches    "/usr/bin/perl" =~ /\/usr\/local\/bin\/perl/;  # matchesIn the last regex, the forward slash C<'/'> is also backslashed,because it is used to delimit the regex.Non-printable ASCII characters are represented by B<escape sequences>.Common examples are C<\t> for a tab, C<\n> for a newline, and C<\r>for a carriage return.  Arbitrary bytes are represented by octalescape sequences, e.g., C<\033>, or hexadecimal escape sequences,e.g., C<\x1B>:    "1000\t2000" =~ m(0\t2)        # matches    "cat"        =~ /\143\x61\x74/ # matches, but a weird way to spell catRegexes are treated mostly as double quoted strings, so variablesubstitution works:    $foo = 'house';    'cathouse' =~ /cat$foo/;   # matches    'housecat' =~ /${foo}cat/; # matchesWith all of the regexes above, if the regex matched anywhere in thestring, it was considered a match.  To specify I<where> it shouldmatch, we would use the B<anchor> metacharacters C<^> and C<$>.  Theanchor C<^> means match at the beginning of the string and the anchorC<$> means match at the end of the string, or before a newline at theend of the string.  Some examples:    "housekeeper" =~ /keeper/;         # matches    "housekeeper" =~ /^keeper/;        # doesn't match    "housekeeper" =~ /keeper$/;        # matches    "housekeeper\n" =~ /keeper$/;      # matches    "housekeeper" =~ /^housekeeper$/;  # matches=head2 Using character classesA B<character class> allows a set of possible characters, rather thanjust a single character, to match at a particular point in a regex.Character classes are denoted by brackets C<[...]>, with the set ofcharacters to be possibly matched inside.  Here are some examples:    /cat/;            # matches 'cat'    /[bcr]at/;        # matches 'bat', 'cat', or 'rat'    "abc" =~ /[cab]/; # matches 'a'In the last statement, even though C<'c'> is the first character inthe class, the earliest point at which the regex can match is C<'a'>.    /[yY][eE][sS]/; # match 'yes' in a case-insensitive way                    # 'yes', 'Yes', 'YES', etc.    /yes/i;         # also match 'yes' in a case-insensitive wayThe last example shows a match with an C<'i'> B<modifier>, which makesthe match case-insensitive.Character classes also have ordinary and special characters, but thesets of ordinary and special characters inside a character class aredifferent than those outside a character class.  The specialcharacters for a character class are C<-]\^$> and are matched using anescape:   /[\]c]def/; # matches ']def' or 'cdef'   $x = 'bcr';   /[$x]at/;   # matches 'bat, 'cat', or 'rat'   /[\$x]at/;  # matches '$at' or 'xat'   /[\\$x]at/; # matches '\at', 'bat, 'cat', or 'rat'The special character C<'-'> acts as a range operator within characterclasses, so that the unwieldy C<[0123456789]> and C<[abc...xyz]>become the svelte C<[0-9]> and C<[a-z]>:    /item[0-9]/;  # matches 'item0' or ... or 'item9'    /[0-9a-fA-F]/;  # matches a hexadecimal digitIf C<'-'> is the first or last character in a character class, it istreated as an ordinary character.The special character C<^> in the first position of a character classdenotes a B<negated character class>, which matches any character butthose in the brackets.  Both C<[...]> and C<[^...]> must match acharacter, or the match fails.  Then    /[^a]at/;  # doesn't match 'aat' or 'at', but matches               # all other 'bat', 'cat, '0at', '%at', etc.    /[^0-9]/;  # matches a non-numeric character    /[a^]at/;  # matches 'aat' or '^at'; here '^' is ordinaryPerl has several abbreviations for common character classes:=over 4=item *\d is a digit and represents [0-9]=item *\s is a whitespace character and represents [\ \t\r\n\f]=item *\w is a word character (alphanumeric or _) and represents [0-9a-zA-Z_]=item *\D is a negated \d; it represents any character but a digit [^0-9]=item *\S is a negated \s; it represents any non-whitespace character [^\s]=item *\W is a negated \w; it represents any non-word character [^\w]=item *The period '.' matches any character but "\n"=backThe C<\d\s\w\D\S\W> abbreviations can be used both inside and outsideof character classes.  Here are some in use:    /\d\d:\d\d:\d\d/; # matches a hh:mm:ss time format    /[\d\s]/;         # matches any digit or whitespace character    /\w\W\w/;         # matches a word char, followed by a                      # non-word char, followed by a word char    /..rt/;           # matches any two chars, followed by 'rt'    /end\./;          # matches 'end.'    /end[.]/;         # same thing, matches 'end.'The S<B<word anchor> > C<\b> matches a boundary between a wordcharacter and a non-word character C<\w\W> or C<\W\w>:    $x = "Housecat catenates house and cat";    $x =~ /\bcat/;  # matches cat in 'catenates'    $x =~ /cat\b/;  # matches cat in 'housecat'    $x =~ /\bcat\b/;  # matches 'cat' at end of stringIn the last example, the end of the string is considered a wordboundary.=head2 Matching this or thatWe can match match different character strings with the B<alternation>metacharacter C<'|'>.  To match C<dog> or C<cat>, we form the regexC<dog|cat>.  As before, perl will try to match the regex at theearliest possible point in the string.  At each character position,perl will first try to match the the first alternative, C<dog>.  IfC<dog> doesn't match, perl will then try the next alternative, C<cat>.If C<cat> doesn't match either, then the match fails and perl moves tothe next position in the string.  Some examples:    "cats and dogs" =~ /cat|dog|bird/;  # matches "cat"    "cats and dogs" =~ /dog|cat|bird/;  # matches "cat"Even though C<dog> is the first alternative in the second regex,C<cat> is able to match earlier in the string.    "cats"          =~ /c|ca|cat|cats/; # matches "c"    "cats"          =~ /cats|cat|ca|c/; # matches "cats"At a given character position, the first alternative that allows theregex match to succeed wil be the one that matches. Here, all thealternatives match at the first string position, so th first matches.=head2 Grouping things and hierarchical matchingThe B<grouping> metacharacters C<()> allow a part of a regex to betreated as a single unit.  Parts of a regex are grouped by enclosingthem in parentheses.  The regex C<house(cat|keeper)> means matchC<house> followed by either C<cat> or C<keeper>.  Some more examplesare    /(a|b)b/;    # matches 'ab' or 'bb'

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄网站免费久久| 一区二区日韩电影| 青青草国产精品亚洲专区无| 国产麻豆精品一区二区| 日韩精品资源二区在线| 免费观看30秒视频久久| 欧美va亚洲va在线观看蝴蝶网| 亚洲国产精品久久一线不卡| 欧美猛男gaygay网站| 午夜精品久久久久久久| 日韩欧美一级在线播放| 成人av影视在线观看| 国产精品剧情在线亚洲| 91网站最新网址| 蜜桃视频免费观看一区| 一区在线播放视频| 精品国产一区二区三区久久影院| 成人av电影在线网| 午夜精品久久久久久久| 国产精品久久久久久久裸模| 欧美人狂配大交3d怪物一区 | 91在线免费视频观看| 久久99精品久久久久久 | 国产精品久久网站| 欧美大片拔萝卜| 制服丝袜av成人在线看| 国产激情视频一区二区三区欧美| 亚洲成av人片一区二区梦乃| 欧美韩国一区二区| 欧美大白屁股肥臀xxxxxx| 欧美性大战xxxxx久久久| 成人国产亚洲欧美成人综合网| 日韩不卡手机在线v区| 亚洲第一福利一区| 亚洲伊人伊色伊影伊综合网| 国产日韩欧美综合一区| 欧美精品一区二区三区在线播放| 在线成人免费观看| 日韩精品一区二区在线| 精品国产乱码久久久久久老虎| 亚洲视频在线观看三级| 久久综合九色综合97婷婷 | 成人激情开心网| 精品国产污污免费网站入口 | 成人av在线播放网址| 麻豆91在线播放免费| 亚洲综合视频在线| 性感美女久久精品| 免费成人在线影院| 久久国产精品99精品国产| 国产乱理伦片在线观看夜一区 | 亚洲精品日韩一| 欧美在线啊v一区| 91福利国产精品| 在线成人免费观看| 中文字幕精品—区二区四季| 一卡二卡欧美日韩| 国产麻豆成人传媒免费观看| 成人一区二区三区在线观看| 色婷婷综合激情| 欧美一卡二卡三卡四卡| 中文欧美字幕免费| 看电视剧不卡顿的网站| 91色在线porny| 中文字幕免费不卡在线| 久久成人精品无人区| 在线精品视频一区二区三四| 精品伦理精品一区| 亚洲第一av色| 91久久一区二区| 亚洲精品一区二区三区蜜桃下载| 亚洲精品成人精品456| 国产成人免费视频网站 | 国产大片一区二区| 欧美成人一区二区三区在线观看| 亚洲激情图片一区| 欧美亚日韩国产aⅴ精品中极品| 国产精品免费网站在线观看| 免费在线观看日韩欧美| 欧美精品久久久久久久多人混战| 亚洲免费伊人电影| 在线免费亚洲电影| 亚洲成a人在线观看| 欧美性高清videossexo| 亚洲精品视频免费观看| 欧美日韩精品综合在线| 亚洲日本丝袜连裤袜办公室| 91精品福利视频| 图片区小说区区亚洲影院| 欧美男男青年gay1069videost| 日本视频一区二区三区| 精品国产乱码久久久久久免费 | 午夜视频一区在线观看| 日韩欧美国产一区在线观看| 国产成人精品综合在线观看| 欧美极品aⅴ影院| 在线综合视频播放| 国产在线一区二区| 亚洲女与黑人做爰| 欧美一区二区成人| av在线不卡电影| 亚洲成人精品一区二区| 欧美精品一区二区在线播放| 99在线热播精品免费| 精品一区二区在线看| 亚洲激情一二三区| 国产欧美一区二区精品忘忧草| 91在线一区二区三区| 激情国产一区二区 | 亚洲国产精品av| 在线中文字幕一区| 国产精品自拍在线| 精品一区二区三区免费播放| 亚洲综合丁香婷婷六月香| 最新国产精品久久精品| 国产欧美中文在线| 亚洲国产成人午夜在线一区| 精品国产乱码久久久久久图片 | 国产一区二区h| 精品中文字幕一区二区| 青青草成人在线观看| 午夜欧美一区二区三区在线播放| 中文字幕日韩欧美一区二区三区| 欧美成人一区二区三区在线观看| 日韩欧美精品在线视频| 精品少妇一区二区三区免费观看| 欧美精品v国产精品v日韩精品| 色偷偷一区二区三区| 91精品国产色综合久久久蜜香臀| 日韩视频免费观看高清完整版 | 成人污污视频在线观看| 波多野结衣中文字幕一区| 91麻豆国产精品久久| 91色视频在线| 欧美变态tickle挠乳网站| 欧美久久久一区| 欧美精品一区二区在线播放| 中文字幕精品在线不卡| 夜夜嗨av一区二区三区| 精品一二三四区| 一本色道亚洲精品aⅴ| 欧美日韩精品三区| www国产亚洲精品久久麻豆| 国产精品大尺度| 青青国产91久久久久久| www.视频一区| 精品国产精品一区二区夜夜嗨| 一区二区高清在线| 成人免费看片app下载| 在线不卡中文字幕播放| 韩国精品主播一区二区在线观看 | 中文字幕乱码一区二区免费| 午夜久久久久久久久久一区二区| 国产一区在线看| 欧美男女性生活在线直播观看| 国产精品系列在线| 成人黄色综合网站| 国产欧美一二三区| 成人激情动漫在线观看| 久久这里只有精品视频网| 曰韩精品一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 久久久噜噜噜久久中文字幕色伊伊 | 国产九色sp调教91| 精品成人在线观看| 激情图片小说一区| 国产丝袜美腿一区二区三区| 久久66热偷产精品| 久久精品一二三| 成人性生交大片免费看中文网站| 中文字幕乱码日本亚洲一区二区| 国产精品自拍一区| 亚洲天堂成人网| 97se亚洲国产综合自在线| 亚洲精选视频免费看| 欧美精品成人一区二区三区四区| 久久se精品一区二区| 国产精品私房写真福利视频| 在线亚洲高清视频| 日韩av电影免费观看高清完整版 | 5月丁香婷婷综合| 国产精品亚洲视频| 亚洲图片欧美一区| 中文字幕一区二区三区精华液| 欧美一卡二卡三卡四卡| 国产成人福利片| 婷婷激情综合网| 日韩一区二区三区视频在线| 欧美aa在线视频| 久久久www成人免费无遮挡大片| 亚洲国产精品t66y| 色婷婷亚洲一区二区三区| 亚洲精品乱码久久久久| 麻豆成人综合网| 亚洲欧美日韩在线不卡| 欧美岛国在线观看| 欧美无人高清视频在线观看| 狠狠色丁香婷婷综合久久片| 亚洲女爱视频在线| 国产精品国产三级国产aⅴ中文|