DelimScanner.rb

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 <damian@cs.monash.edu.au>.

Synopsis

  se = DelimScanner::new( myString )

Authors

  • Michael Granger <ged@FaerieMUD.org>
  • Gonzalo Garramuno <GGarramuno@aol.com>

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 creativecommons.org/licenses/by/1.0 or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Version

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

History

  • 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  

[Validate]