How to Install and Uninstall libre2j-java Package on Ubuntu 21.10 (Impish Indri)

Last updated: November 26,2024

1. Install "libre2j-java" package

This guide covers the steps necessary to install libre2j-java on Ubuntu 21.10 (Impish Indri)

$ sudo apt update $ sudo apt install libre2j-java

2. Uninstall "libre2j-java" package

Please follow the guidance below to uninstall libre2j-java on Ubuntu 21.10 (Impish Indri):

$ sudo apt remove libre2j-java $ sudo apt autoclean && sudo apt autoremove

3. Information about the libre2j-java package on Ubuntu 21.10 (Impish Indri)

Package: libre2j-java
Architecture: all
Version: 1.5+dfsg-2
Multi-Arch: foreign
Priority: optional
Section: universe/java
Source: re2j
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian Java Maintainers
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 150
Filename: pool/universe/r/re2j/libre2j-java_1.5+dfsg-2_all.deb
Size: 116412
MD5sum: 73e1d0a79c3f9eede4e3573e2ffc551d
SHA1: 42027b13cc37e32d4de5daa85544e253cbd7eacd
SHA256: 2f487336ada18da9a6fe2f452662be08f331f09844689b3caaa510bca29224e4
SHA512: f3a09a31d187b23e0cbbbc8db561b36eec70e9341f52d892e2ecfd0565cafc88baca5c88f054476f624cadb9d7cafbf6e2a3a8da2533ff04a0fe7e003803f0f7
Homepage: https://github.com/google/re2j
Description-en: RE2/J: linear time regular expression matching in Java
RE2 is a regular expression engine that runs in time linear in the size of the
input. RE2/J is a port of RE2 to pure Java.
.
Java's standard regular expression package, java.util.regex, and many other
widely used regular expression packages such as PCRE, Perl and Python use a
backtracking implementation strategy: when a pattern presents two alternatives
such as a|b, the engine will try to match subpattern a first, and if that
yields no match, it will reset the input stream and try to match b instead.
.
If such choices are deeply nested, this strategy requires an exponential
number of passes over the input data before it can detect whether the input
matches. If the input is large, it is easy to construct a pattern whose
running time would exceed the lifetime of the universe. This creates a
security risk when accepting regular expression patterns from untrusted
sources, such as users of a web application.
.
In contrast, the RE2 algorithm explores all matches simultaneously in a single
pass over the input data by using a nondeterministic finite automaton.
.
There are certain features of PCRE or Perl regular expressions that cannot be
implemented in linear time, for example, backreferences, but the vast majority
of regular expressions patterns in practice avoid such features.
Description-md5: 6e8a1c416dea1831f4a1a03d245727ec