ChinaUnix.net
相关文章推荐:

tcl 正则表达式

我现在需要使用tcl正则表达式去匹配一些情况。 检查文本中的每一行里面,是否有我列表里的关键字。 代码如下 [code]regexp -all {(.*)($block)(.*)} $line s1 s2 s3 s4;[/code] 其中block是列表中的一个关键字。但是这样写,达不到我想要的结果。貌似tcl无法支持这种写法。 相反,换成 [code]regexp -all {(.*)(brom)(.*)} $line s1 s2 s3 s4; regexp -all {(.*)(cpu)(.*)} $line s1 s2 s3 s4;[/code] 之类的,就可以,但关键字列...

by patrick007 - Perl - 2008-12-03 22:30:54 阅读(1971) 回复(2)

相关讨论

set str "a b c c" if {[regexp {a(.*?)\s*c} $str match1 rs1]} { puts $match1 puts $rs1 } puts ----------- if {[regexp {\s*a(.*?)\s*c} $str match2 rs2]} { puts $match2 puts $rs2 } 结果: a b c b ----------- a b c c b c 怎么会这样 就多了个\s*???

by leaner - Perl - 2005-09-09 23:44:45 阅读(1829) 回复(2)

怎么有perl,而没有tcl的啊,哪位高手搞个tcl论坛好不好

by xzyhope - 站务交流 - 2006-03-24 15:30:45 阅读(1214) 回复(7)

http://hi.baidu.com/xipf/blog/item/085f996228e3b4d8e6113a1d.html http://hi.baidu.com/lvgb/blog/item/1b983e2a1d64823e5243c16c.html http://linux.about.com/library/cmd/blcmdln_tcl.htm http://www.lslnet.com/linux/dosc1/45/linux-316340.htm 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/27594/showart_1308200.html

by zhangyan215 - HP文档中心 - 2008-10-15 18:25:19 阅读(1831) 回复(0)

我在tcl脚本中想实现shell命令“cd”, 用exec cd $myDir 但exec会开一个新的进程,并在新的进程中执行cd,执行完后退出(我自己的解释,不知道对不对?),所以执行cd命令好像没有用。谁能帮忙解决一下?

by fightforever - Shell - 2003-08-08 16:36:51 阅读(2171) 回复(2)

“鹰的重生”需要的不只是勇气和时间,还有能力。李东生正逐渐具有,但还不够完备。   “我感觉,这个隧道快要走出去了。”   李东生是在介绍tcl集团通信业务现状时说出这句话的。在近日公告的半年报中,主营业务为手机制造的tcl通讯(HKG:2618),今年1~6月的销售收入达11.63 亿元,同比减少44.64%;亏损3950万港元,提出可转换债券影响后的亏损达1.04亿港元。   与通信业务不同的是,主营业务为彩电的tcl多媒...

by iori833 - IT业界快报 - 2009-09-08 11:20:41 阅读(345) 回复(0)

非科班,有一些tcl 和C++经验,因为tcl目前可直接复用的代码不多,目前想在Python 和Ruby中选一个,不知道那位能说一下,Python/Ruby 那一个适合快速上手?我主要用其开发一些日常工作中带简单GUI的小工具,涉及网络,数据库,和一些文本的处理。 ps, 无意引发口水战......

by IEAK - Python - 2009-06-02 16:43:55 阅读(2514) 回复(8)

when I try run my test scripts in 40 mins, it reports a bug. [root@localhost scripts]# tclsh % time "./doutest.exp" I am Dou test finished -2147483648 microseconds per iteration and 2147483648=2^31 [root@localhost scripts]# tclsh -v % info patchlevel 8.5.1 % how to resolve it?

by marsbird - Shell - 2008-12-24 10:47:53 阅读(922) 回复(4)