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: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 66:53:52 |
Calls: | 6,915 |
Files: | 12,379 |
Messages: | 5,431,768 |