summaryrefslogtreecommitdiffstats
path: root/library/word.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-01-30 17:46:30 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-01-30 17:46:30 (GMT)
commit3475ea5378a063cc71bc3c0e35ae338c31d0426f (patch)
tree2b6f271802dff517ab1ac014a845780edd5ee2d3 /library/word.tcl
parent46d5769e5f4e9edd66b356958496b14cb9265f4e (diff)
downloadtcl-3475ea5378a063cc71bc3c0e35ae338c31d0426f.zip
tcl-3475ea5378a063cc71bc3c0e35ae338c31d0426f.tar.gz
tcl-3475ea5378a063cc71bc3c0e35ae338c31d0426f.tar.bz2
In the script library, selected modernizations from Patrick Fradin.
Diffstat (limited to 'library/word.tcl')
-rw-r--r--library/word.tcl10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/word.tcl b/library/word.tcl
index 16a4638..b8f34a5 100644
--- a/library/word.tcl
+++ b/library/word.tcl
@@ -67,7 +67,7 @@ namespace eval ::tcl {
proc tcl_wordBreakAfter {str start} {
variable ::tcl::WordBreakRE
set result {-1 -1}
- regexp -indices -start $start $WordBreakRE(after) $str result
+ regexp -indices -start $start -- $WordBreakRE(after) $str result
return [lindex $result 1]
}
@@ -85,7 +85,7 @@ proc tcl_wordBreakAfter {str start} {
proc tcl_wordBreakBefore {str start} {
variable ::tcl::WordBreakRE
set result {-1 -1}
- regexp -indices $WordBreakRE(before) [string range $str 0 $start] result
+ regexp -indices -- $WordBreakRE(before) [string range $str 0 $start] result
return [lindex $result 1]
}
@@ -104,7 +104,7 @@ proc tcl_wordBreakBefore {str start} {
proc tcl_endOfWord {str start} {
variable ::tcl::WordBreakRE
set result {-1 -1}
- regexp -indices -start $start $WordBreakRE(end) $str result
+ regexp -indices -start $start -- $WordBreakRE(end) $str result
return [lindex $result 1]
}
@@ -122,7 +122,7 @@ proc tcl_endOfWord {str start} {
proc tcl_startOfNextWord {str start} {
variable ::tcl::WordBreakRE
set result {-1 -1}
- regexp -indices -start $start $WordBreakRE(next) $str result
+ regexp -indices -start $start -- $WordBreakRE(next) $str result
return [lindex $result 1]
}
@@ -138,7 +138,7 @@ proc tcl_startOfNextWord {str start} {
proc tcl_startOfPreviousWord {str start} {
variable ::tcl::WordBreakRE
set word {-1 -1}
- regexp -indices $WordBreakRE(previous) [string range $str 0 $start-1] \
+ regexp -indices -- $WordBreakRE(previous) [string range $str 0 $start-1] \
result word
return [lindex $word 0]
}