Path: lib/Getopt/DelimScanner.rb
Last Update: Tue Mar 13 05:25:07 ART 2007

A derivative of StringScanner that can scan for delimited constructs in addition to regular expressions. It is a loose port of the Text::Balanced module for Perl by Damian Conway <>.


  se = DelimScanner::new( myString )


  • Michael Granger <>
  • Gonzalo Garramuno <>

Copyright © 2002, 2003 The FaerieMUD Consortium. Most rights reserved.

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.


 $Id: DelimScanner.rb,v 1.2 2003/01/12 20:56:51 deveiant Exp $


  • Added :suffix hash key for returning rest (right) of matches, like Perl’s Text::Balanced, on several methods.
  • Added one or two \ for backquoting brackets, as new ruby1.8 complains

Required files

strscan   forwardable