Regular expression for validating hostname

Just type irb at your command prompt and an Interactive Ruby Session will start as given below − Do not worry about what we did here.You will learn all these steps in subsequent chapters. Live Demo You have seen a simple Ruby program, now let us see a few basic concepts related to Ruby Syntax.Within the IRb shell, you can immediately view expression results, line by line.

regular expression for validating hostname-35

You can find the name Yukihiro Matsumoto on the Ruby mailing list at Matsumoto is also known as Matz in the Ruby community. Ruby has features that are similar to those of Smalltalk, Perl, and Python.This tutorial will teach you all the important topics related to environment setup.We would recommend you to go through the following topics first and then proceed further − Interactive Ruby (IRb) provides a shell for experimentation.You can, therefore, define a class as a combination of characteristics and functions.

A class Vehicle can be defined as − By assigning different values to these data members, you can form several instances of the class Vehicle.

Perl, Python, and Smalltalk are scripting languages. Ruby, like Smalltalk, is a perfect object-oriented language.

Using Ruby syntax is much easier than using Smalltalk syntax.

A vehicle can also have certain functions, such as halting, driving, and speeding.

Even these functions form the data members of the class Vehicle.

For performing the examples discussed in this tutorial, you will need a latest computer like Intel Core i3 or i5 with a minimum of 2GB of RAM (4GB of RAM recommended).