RosettaCodeData/Task/Regular-expressions/Tcl/regular-expressions-1.tcl
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07: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'"
}