Mastering Ruby Regular Expressions

Ruby regular expressions (ruby regex for short) help you find specific patterns inside strings, with the intent of extracting data for further processing. Two common use cases for regular expressions include validation & parsing. For example: Think about an email address, with a ruby regex you can define what a valid email address looks like. … Read more

How To Read & Write Files in Ruby (With Examples)

Today you’ll learn how to read & write files in Ruby so you can extract the contents, create new files, and find the information you need! Let’s do this! How to Read Files In Ruby You can read a file in Ruby like this: Open the file, with the open method. Read the file, the … Read more

Ruby Network Programming

Do you want to create custom network clients & servers in Ruby? Or just understand how that works? Then you will have to deal with sockets. Join me on this tour of ruby network programming to learn the basics, and start talking to other servers and clients using Ruby! So what are sockets? Sockets are … Read more

How to Build a Parser With Ruby

Parsing is the art of making sense of a bunch of strings and converting them into something we can understand. You could use regular expressions, but they are not always suitable for the job. For example, it is common knowledge that parsing HTML with regular expressions is probably not a good idea. In Ruby we have … Read more