# \[ann\] regexp-engine 0.10

**URL:** <https://rubytalk.org/t/ann-regexp-engine-0-10/11391>\
**Category:** ruby-talk\
**Created:** [6 May 2004 17:18 UTC](https://rubytalk.org/t/ann-regexp-engine-0-10/11391 "2004-05-06T17:18:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Strandgaard1](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@Simon\_Strandgaard1](https://rubytalk.org/u/Simon_Strandgaard1)\
**Post date:** [6 May 2004 17:18 UTC](https://rubytalk.org/t/ann-regexp-engine-0-10/11391/1 "2004-05-06T17:18:40Z")

</div>

download:  
[http://rubyforge.org/frs/?group\_id=18&release\_id=465](http://rubyforge.org/frs/?group_id=18&release_id=465)

play with regexp online:  
[http://neoneye.dk/regexp.rbx](http://neoneye.dk/regexp.rbx)

RAA entry:  
[http://raa.ruby-lang.org/list.rhtml?name=regexp](http://raa.ruby-lang.org/list.rhtml?name=regexp)

I am proud to present an Regexp-engine written entirely in Ruby,  
fairly compatible with Ruby’s native engine (GNU).

There are 2 major changes since last version:

- Added lookbehind positive/negative of variable-width.  
/g(?\<=(a.\*)g)o./ ~= ‘goa algol goto’ #-\> [‘gol’, ‘a al’]  
For instance the Oniguruma engine chokes on such expressions  
because it only supports fixed-width lookbehind.

- I now preserve subcaptures (Earlier I accidentially cleared subcaptures).  
/a(|ab)\*b/ ~= ‘aaabbb’ #-\> [‘aabb’, ‘ab’]  
For instance the Oniguruma engine very often clears subcaptures,  
and in this case it outputs [‘aabb’, ‘’]… which is less desired.

> **···**
>
> –  
> Simon Strandgaard
