RosettaCodeData/Task/Regular-expressions/Tcl/regular-expressions-1.tcl
2023-07-01 13:44:08 -04:00

8 lines
180 B
Tcl

set theString "I am a string"
if {[regexp -- {string$} $theString]} {
puts "Ends with 'string'"
}
if {![regexp -- {^You} $theString]} {
puts "Does not start with 'You'"
}