Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
text = "Contact us at support@example.com or visit our website."
email_pattern = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b/i
if text.match?(email_pattern)
puts "Email found!"
puts text.scan(email_pattern)
else
puts "No email found."
endCoding works best on desktop or with an external keyboard.