summaryrefslogtreecommitdiffstats
path: root/library/word.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-01-30 17:58:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-01-30 17:58:00 (GMT)
commitf26510438d420ec20e8840063ca9c3cc8989663e (patch)
tree7a5a21328d26afb61961c84fae455f653161f18a /library/word.tcl
parenta528a204f2cedc505d1d28610ecf975740f12fcd (diff)
parent3475ea5378a063cc71bc3c0e35ae338c31d0426f (diff)
downloadtcl-f26510438d420ec20e8840063ca9c3cc8989663e.zip
tcl-f26510438d420ec20e8840063ca9c3cc8989663e.tar.gz
tcl-f26510438d420ec20e8840063ca9c3cc8989663e.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]
}