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

4 lines
144 B
Tcl

set theString "This string has >123< a number in it"
if {[regexp -- {>(\d+)<} $theString -> number]} {
puts "Contains the number $number"
}