摘要: $identify 的 “identify” 表示一个Perl标识符,即 identifier 阅读全文
posted @ 2019-07-04 14:22 jimy1 阅读(226) 评论(0) 推荐(0) 编辑
摘要: #! /usr/bin/perl use strict; use warnings;#my @strict_pragma = qw ( a b c);#print $strict_pragma[0];print "\n _delimiter_match_http:// \n";$_ = "https 阅读全文
posted @ 2019-07-04 14:12 jimy1 阅读(309) 评论(0) 推荐(0) 编辑
摘要: #! /usr/bin/perl use strict; use warnings;print "\n simple_pattern_metacharacter_quantifier \n";$_ = "asteriskasterisk hash access unpack_func";for (/ 阅读全文
posted @ 2019-07-04 14:11 jimy1 阅读(209) 评论(0) 推荐(0) 编辑
摘要: #! /usr/bin/perl use strict; use warnings;print "\n _substitutions_with_s/// \n";$_ = "He's out bowling with Barney tonight.";s/Barney/Fred/;print $_. 阅读全文
posted @ 2019-07-04 13:30 jimy1 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 先行断言: /a(?=b)/ ,positive lookahead,a的后方必须是b才行 /a(?!b)/ ,negative lookahead,a的后方必须不是b才能匹配 如下图示: 来自:https://regexper.com/#%2F%5Cd%28%3F%3D%5BAB%5D%29%2F 阅读全文
posted @ 2019-07-04 10:33 jimy1 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Regex of Perl: ?= 指的是如果后面匹配到,则后面的内容不做替换,保留。 ab, s/a?=b/x/,变为xb,即后面匹配到b,b保留不做替换 阅读全文
posted @ 2019-07-04 10:08 jimy1 阅读(242) 评论(0) 推荐(0) 编辑
Total Visits
AmazingCounters.com