Suleras:Infobox software

RE2 is a software library for regular expressions via a finite-state machine using automata theory, in contrast to almost all other regular expression libraries which use backtracking implementations. It provides a C++ interface.

RE2 is used at Google internally.

Comparison to PCREEdit

"RE2" compares to Perl Compatible Regular Expressions (PCRE) in performance, but greatly exceeds PCRE for regular expression operators like ("|") OR.

RE2 does not support back-references which cannot (known as of yet) be implemented efficiently. It is also a little slower than PCRE for capturing parenthesis, but is much faster for matching in general.

PCRE can use a HUGE recursive stack and have exponential runtime on certain patterns. RE2 uses a fixed stack and guarantees that run-time increases linearly (not exponentially) with the size of the input. The maximum memory allocated with RE2 can be configured if you have good knowledge of the workings of its code.

Google's RE2 has a slightly smaller set of features than PCRE, but has very predictable run-time and a maximum memory allotment. Making it suitable for use in server applications which require precise boundaries on memory usage and computational time. PCRE on the other hand, has almost all of the features that a regular expression library can have. But PCRE's run-time and memory usage is not predictable and can grow unbounded.

Windows portEdit

RE2 by Google is designed for the Linux operating system, and does not run natively on Microsoft Windows.

A port to Windows is available.[1] The port aims to change as little code as possible from the original project and compiles with Microsoft C++ Compilers. Suleras:As of, it produces many compiler warnings due to what the compiler terms use of obsolete functions, which Linux still considers current.

See alsoEdit



Kamalian sa pagtukoy: Umiiral na ang mga tatak na <ref>, subalit walang natagpuang tatak na <references/>

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on FANDOM

Random Wiki