上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 先行断言: /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 阅读(481) 评论(0) 推荐(0)
摘要: Regex of Perl: ?= 指的是如果后面匹配到,则后面的内容不做替换,保留。 ab, s/a?=b/x/,变为xb,即后面匹配到b,b保留不做替换 阅读全文
posted @ 2019-07-04 10:08 jimy1 阅读(249) 评论(0) 推荐(0)
摘要: Perl:正则中问号的四周用途:1.字面意义的问号 2. 量词 3. 表示非贪心的修饰符 4.用以表示不具有记忆功能的圆括号 非贪心:在量词后面加?即可 阅读全文
posted @ 2019-07-03 16:03 jimy1 阅读(436) 评论(0) 推荐(0)
摘要: 要把下面文件的内容改了, Program name: graniteAuthor: Gilbert BatesCompany: RockSoftDepartment: R&DPhone: +1 503 555-0095Date: Tues March 9, 2004Version: 2.1Size: 阅读全文
posted @ 2019-07-03 15:08 jimy1 阅读(1023) 评论(0) 推荐(0)
摘要: vi. To input the ^M character, press Ctrl-v , and then press Enter or return . In vim, use :set ff=unix to convert to Unix; use :set ff=dos to convert 阅读全文
posted @ 2019-07-03 14:34 jimy1 阅读(151) 评论(0) 推荐(0)
摘要: 89 open FILE, "< file_4_ex_ch7.txt" 90 or die "cannot open file: $!"; 91 my $lines = join '', <FILE>; 92 print $lines."\n"; 93 $lines =~ s/^/file_4_ex 阅读全文
posted @ 2019-07-03 11:18 jimy1 阅读(206) 评论(0) 推荐(0)
摘要: Perl:只是把“^”作为匹配的单字:只是匹配每一行的开头 $lines =~ s/^/file_4_ex_ch7.txt: /gm; 阅读全文
posted @ 2019-07-03 11:17 jimy1 阅读(311) 评论(0) 推荐(0)
摘要: 48 print @globbing."\n"; 输出: 3 阅读全文
posted @ 2019-07-02 16:04 jimy1 阅读(170) 评论(0) 推荐(0)
摘要: -c, –continue 接着下载没下载完的文件 -r, –recursive 递归下载 -np, –no-parent 不要追溯到父目录 -k, –convert-links 转换非相对链接为相对链接 -L, –relative 仅仅跟踪相对链接 -p, –page-requisites 下载显 阅读全文
posted @ 2019-07-02 14:15 jimy1 阅读(1375) 评论(0) 推荐(0)
摘要: 正则表达式中 /s 可以帮助“.”匹配所有的字符,包括换行,从而实现【\d\D】的功能 阅读全文
posted @ 2019-07-02 11:22 jimy1 阅读(516) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
Total Visits
AmazingCounters.com