Programming With Ruby Episode 6, Strings

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
5,234
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 11, 2009

In this episode you learn about using strings in Ruby. More specifically: String literals, string expressions, useful string methods, regular expressions, and getting user input

Donate: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4222118

Original Post and Transcript: http://manwithcode.com/101/programming-with-ruby-episode-6-strings/

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (manwithcode)

  • I don't really understand the scan expression. Could you explain more on what (/../) or (/\w\w/) do?

  • @parks709 What's surrounded by the "/"s is called a regular expression. It's a way of processing text. "." means, select any character. "\w" is for whitespace. Regular expressions are a huge topic, so just do a Google search to find out more.

  • You sir, have just earned yourself a subscriber.

  • @CaptainGibbons Excellent! :)

  • I am using latest version of ruby interactive on windows 7. When I type "Hello".each_char do [x], the program is giving me an error that says undefined variable. Is there a way to fix this?

  • @whitedragon812 If the code looks the way you posted it in your comments, the problem is a syntax error. There aren't supposed to be square brackets around the x variable, it's supposed to be the pipe character (usually found above the enter key).

    It should look like this: |x|

    Not this: [x]

see all

All Comments (34)

Sign In or Sign Up now to post a comment!
  • @CaptainGibbons lol what a coincidence I subscribed also. . . and I know you XD

  • @cashjamesPremium1 I haven't been able to reproduce the problem you're encountering, are you sure you've typed the code in correctly?

  • @manwithcode i am Running the Newest Version ,the latest version

  • @manwithcode i am using windows 7 Ultimate

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more