Created
October 12, 2011 13:01
-
-
Save hasayvaz/1281170 to your computer and use it in GitHub Desktop.
regular expressions examples in ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| string1 = "hasan eve kos, kos hasan kos" | |
| if string1 =~ /^hasan/ | |
| puts "buldum ", $1 | |
| else | |
| puts "bulamadim" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍