How To Install ruby-regexp-parser on Debian 11

In this tutorial we learn how to install ruby-regexp-parser on Debian 11. ruby-regexp-parser is Scanner, lexer, parser for rubys regular expressions

Introduction

In this tutorial we learn how to install ruby-regexp-parser on Debian 11.

What is ruby-regexp-parser

ruby-regexp-parser is:

A library for tokenizing, lexing, and parsing Ruby regular expressions.

  • Multilayered
    • A scanner/tokenizer based on Ragel
    • A lexer that produces a “stream” of token objects.
    • A parser that produces a “tree” of Expression objects (OO API)
  • Runs on Ruby 1.9, 2.x, and JRuby (1.9 mode) runtimes.
  • Recognizes Ruby 1.8, 1.9, and 2.x regular expressions

There are three methods to install ruby-regexp-parser on Debian 11. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ruby-regexp-parser Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install ruby-regexp-parser using apt-get by running the following command:

sudo apt-get -y install ruby-regexp-parser

Install ruby-regexp-parser Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-regexp-parser using apt by running the following command:

sudo apt -y install ruby-regexp-parser

Install ruby-regexp-parser Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install ruby-regexp-parser using aptitude by running the following command:

sudo aptitude -y install ruby-regexp-parser

How To Uninstall ruby-regexp-parser on Debian 11

To uninstall only the ruby-regexp-parser package we can use the following command:

sudo apt-get remove ruby-regexp-parser

Uninstall ruby-regexp-parser And Its Dependencies

To uninstall ruby-regexp-parser and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove ruby-regexp-parser

Remove ruby-regexp-parser Configurations and Data

To remove ruby-regexp-parser configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge ruby-regexp-parser

Remove ruby-regexp-parser configuration, data, and all of its dependencies

We can use the following command to remove ruby-regexp-parser configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-regexp-parser

Dependencies

ruby-regexp-parser have the following dependencies:

References

Summary

In this tutorial we learn how to install ruby-regexp-parser package on Debian 11 using different package management tools: apt, apt-get and aptitude.