Skip to content

Instantly share code, notes, and snippets.

@hasayvaz
Created October 12, 2011 13:01
Show Gist options
  • Select an option

  • Save hasayvaz/1281170 to your computer and use it in GitHub Desktop.

Select an option

Save hasayvaz/1281170 to your computer and use it in GitHub Desktop.
regular expressions examples in ruby
#!/usr/bin/ruby
string1 = "hasan eve kos, kos hasan kos"
if string1 =~ /^hasan/
puts "buldum ", $1
else
puts "bulamadim"
end
@gdemir

gdemir commented Oct 14, 2011

Copy link
Copy Markdown

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment