[ann] regexp-engine 0.10

  • Thread starter Simon Strandgaard
  • Start date
S

Simon Strandgaard

download:
http://rubyforge.org/frs/?group_id=18&release_id=465

play with regexp online:
http://neoneye.dk/regexp.rbx

RAA entry:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top