Article View: pl.comp.lang.tcl
Article #349Re: regexp bez podsłów
From: Mirosław Kosmala
Date: Sat, 04 Mar 2006 11:20
Date: Sat, 04 Mar 2006 11:20
23 lines
1620 bytes
1620 bytes
Googie wrote:
>
>> Jest też inna możliwość.
>>
>> set word(xx) bb
>>
>> set rc ""
>> foreach {- before word after} [regexp -all -inline \
>> "(^|\\s)(\\w*?)(\\s|\$)" $text] {
>> catch {set word $replace($word)}
>> append rc $before $word $after
>> }
>
> Ten zapis mnie rozłożył na łopatki. Gdybym znał to wczesniej... Tyle
> pracy :/
>
Nie tylko ciebie dobił tą pętelką ;-))))))))
--
Miroslaw Kosmala mail-to:miroslaw.kosmala(|)trilowcy.org
Linux User:#197007 root:$1$ueQ1d75z$NlDhu6oQhfUpmBlnKTDpj0:
Technical Details
Message-ID:
<dubpk9$bjd$1@atlantis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<op.s5mlego53jrrtc@bmw-ws076.bqeu.corp.com> <op.s5m7wzjw7lonqf@hesus.mshome.net> <dtvel5$2q6$1@srv.cyf-kr.edu.pl> <op.s5m872gg7lonqf@hesus.mshome.net> <dtvgbl$3f3$1@srv.cyf-kr.edu.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Mirosław Kosmala <miroslaw.kosmala@trilowcy.org> Newsgroups: pl.comp.lang.tcl Subject: Re: regexp bez podsłów Date: Sat, 04 Mar 2006 11:20:43 +0000 Organization: tp.internet - http://www.tpi.pl/ Lines: 24 Message-ID: <dubpk9$bjd$1@atlantis.news.tpi.pl> References: <op.s5mlego53jrrtc@bmw-ws076.bqeu.corp.com> <op.s5m7wzjw7lonqf@hesus.mshome.net> <dtvel5$2q6$1@srv.cyf-kr.edu.pl> <op.s5m872gg7lonqf@hesus.mshome.net> <dtvgbl$3f3$1@srv.cyf-kr.edu.pl> Reply-To: miroslaw.kosmala@trilowcy.org NNTP-Posting-Host: egp86.neoplus.adsl.tpnet.pl Mime-Version: 1.0 X-Trace: atlantis.news.tpi.pl 1141467593 11885 83.21.79.86 (4 Mar 2006 10:19:53 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sat, 4 Mar 2006 10:19:53 +0000 (UTC) User-Agent: KNode/0.9.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit