Ruby Regexp

A magical tool for text processing

by Sundeep Agarwal

DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

Scripting and automation tasks often need to extract particular portions of text from input data or modify them from one format to another.

This book will help you learn Ruby Regular Expressions, a mini-programming language for all sorts of text processing needs.

The book heavily leans on examples to present features of regular expressions one by one. It is recommended that you manually type each example and experiment with them.

You should have prior experience working with Ruby, should know concepts like blocks, string formats, string methods, Enumerable, etc.

This open book is licensed under a Creative Commons License (CC BY-NC-SA). You can download Ruby Regexp ebook for free in PDF format (0.5 MB).

Table of Contents

Chapter 1
Why is it needed?
 
Chapter 2
Regexp literal and operators
 
Chapter 3
Anchors
 
Chapter 4
Alternation and Grouping
 
Chapter 5
Escaping metacharacters
 
Chapter 6
Dot metacharacter and Quantifiers
 
Chapter 7
Working with matched portions
 
Chapter 8
Character class
 
Chapter 9
Groupings and backreferences
 
Chapter 10
Lookarounds
 
Chapter 11
Modifiers
 
Chapter 12
String Encoding
 
Chapter 13
Miscellaneous
 
Chapter 14
Gotchas
 

Book Details

Subject
Computer Science
Publisher
Self-publishing
Published
2020
Pages
72
Edition
1
Language
English
PDF Size
0.5 MB
License
CC BY-NC-SA

Related Books

I Love Ruby
Ruby is an easy to learn programming language, it was invented by a guy named Matz in Japan. Ruby is a free software and can be used by any one for zero cost. Ruby's popularity was initially confined to Japan, later it slowly trickled out to rest of the world. Things changed with the emergence of Ruby on Rails which is a popular web-development fra...
Ruby Notes for Professionals
The Ruby Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow....
Using Blocks in Ruby
Unannounced and unmarked, blocks turn up all over Ruby programs. Their use ranges from some of Ruby's most basic structures, such as loops, to some of its most sophisticated tricks. Similar to closures or lambdas in other languages, blocks enable some of Ruby's vaunted efficiency. Blocks even allow other people to write some of the code you use. ...
RESTful Web Services
You've built web sites that can be used by humans. But can you also build web sites that are usable by machines? That's where the future lies, and that's what RESTful Web Services shows you how to do. The World Wide Web is the most popular distributed application in history, and Web services and mashups have turned it into a powerful distributed co...
JavaScript RegExp
The book heavily leans on examples to present features of regular expressions one by one. It is recommended that you manually type each example and experiment with them. You should have a good understanding of basic-level programming concepts and prior experience working with JavaScript. Should also know functional programming concepts like map ...
Sowing Legume Seeds, Reaping Cash
This open access book shares impact stories – testimonies from various value chain actors who have been part of the Tropical Legumes (TL) projects, over the past twelve years. The Tropical Legumes projects led by ICRISAT in three parts (TLI, TLII and TLIII), constitute a major international initiative supported by the Bill & Melinda Gates...