4 lines
116 B
Ruby
4 lines
116 B
Ruby
|
|
str = "I am a string"
|
||
|
|
p "Ends with 'string'" if str =~ /string$/
|
||
|
|
p "Does not start with 'You'" unless str =~ /^You/
|