Hi, after spend a couple of time to check some "unwanted" behavior I figure out that
"regexp -line…" bypass the newline "\n" -line border !!
mfg ao
=========================================================================== #!/bin/env tclsh
set txtS {
\noop BEGIN-MkKernel-setup-f
\noop END-MkKernel-setup-f
}
regexp -line -start 0 "^(.*BEGIN-MkKernel-setup-f)(?:\\s.*)?$" $txtS allS prefixS
puts "allS<$allS>"
puts ""
puts "prefixS<$prefixS>"
exit
# ------------------------------------------------------------------
#
# allS !! include !! newline
#
#
# allS<\noop BEGIN-MkKernel-setup-f
# \noop END-MkKernel-setup-f>
#
# prefixS<\noop BEGIN-MkKernel-setup-f>
* aotto1968 <aotto1968@t-online.de>
| there is also a "[[:blank:]]" which seems to be the "\s" - "\n" but who knows?
man re_syntax:
blank A space or tab character.
space A character producing white space in displayed text.
\s [[:space:]]
HTH
R'
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 920 |
Nodes: | 10 (0 / 10) |
Uptime: | 101:04:33 |
Calls: | 12,189 |
Calls today: | 1 |
Files: | 186,527 |
Messages: | 2,237,445 |