| Short description: |
regular expression engine |
| Category: |
Library/Regular Expressions |
| Status: |
usable |
| Created: |
2003-11-06 21:07:41 GMT |
| Last update: |
2004-09-07 19:28:18 GMT |
| Owner: |
neoneye
(Projects of this owner) |
| Homepage: |
not available |
| Download: |
http://rubyforge.org/frs/?group_id=18&release_id=788
|
| License: |
Ruby's |
| Dependency: |
|
| Description: |
Here is an Regexp engine written entirely in Ruby.
It allows you to search in text with advanced search patterns.
It supports Perl5 syntax... plus some perl6 syntax (more to
come in the future). Its fairly compatible with Ruby's native
regexp engine (GNU), and when running against the Rubicon
testsuite, it passes 96.66% out of 1560 total tests.
The implementation is simple, yet without any optimizations.
Therefore speed is slow.. At some point when optimizations
are in place, I plan to do a re-implementation in C++.
Because of the simplicity, the code should be easy to grasp
and extend with your own custom code.
One feature that may interest you is the #tree method, you can use like this:
irb(main):001:0> require 'regexp'
=> true
irb(main):002:0> puts /ab|cd(?=x)|xxx/.tree
+-Alternation
+-Sequence
| +-Inside set="a"
| +-Inside set="b"
+-Sequence
| +-Inside set="c"
| +-Inside set="d"
| +-Lookahead positive
| +-Inside set="x"
+-Sequence
+-Inside set="x"
+-Inside set="x"
+-Inside set="x"
=> nil
irb(main):003:0>
This can be handy sometimes for debugging.
|
| Versions: |
[0.11 (2004-09-07)]
[0.10 (2004-05-06)]
[0.9 (2004-04-27)]
[0.8 (2004-04-22)]
[0.7 (-)]
|