Sep 25

Regular Expression and Blocks

Category: Basics

Ruby expressions would be shocking for the uninitiated or those who are shifting form other programming languages. If you have experience with Perl or Python, then you’re in luck for they won’t send you packing up and running in fear. The term “regular expression” is used to have a program check if it looks like something else in terms of similar characters or spacing, length or a myriad of other things that you may think of. The table form Ruby.org summarizes all the Ruby expressions and elements. Regular expressions are used for matching certain patterns such that if you’d want to check for a digit you use the \d expression or to match a space character, you use the \s expression to match a space character.

No comments

Comments are closed.