For example, my text is :
Block 1:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx
Block 2:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx
Block 3:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx
I want to split the by the different blocks, in tcl. Eg:
{Block 1:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx}
{Block 2:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx}
{Block 3:
xxxxxx xxxx
xxxxxx xxxx
xxxxxx xxxx}
Any way to make this work? Thanks!
Try the tcllib `textutil::splitx`` command. (see http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/textutil/textutil.html#8 )
It can split text based on a regular expression.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.