2 coded by Ketmar // Vampire Avalon (psyc://ketmar.no-ip.org/~Ketmar)
3 Understanding is not required. Only obedience.
5 This program is free software. It comes without any warranty, to
6 the extent permitted by applicable law. You can redistribute it
7 and/or modify it under the terms of the Do What The Fuck You Want
8 To Public License, Version 2, as published by Sam Hocevar. See
9 http://sam.zoy.org/wtfpl/COPYING for more details.
16 ^newREHandle: aStr type: aType [
17 <#RegExpDo 0 aType aStr>.
22 self error: 'use newHS: or newTX: to create RegExpr'
27 (rh class == String) ifTrue: [ ^rh ].
29 self in: obj var: #rh put: rh.
34 ^self newWithRH: (self newREHandle: aStr type: 0)
38 ^self newWithRH: (self newREHandle: aStr type: 1)
47 <#RegExpDo 1 rh aStr>.
57 <#RegExpDo 3 rh aIdx>.
62 <#RegExpDo 4 rh aIdx>.
68 (s := self subStart: aIdx) < 0 ifTrue: [ ^nil ].
69 (e := self subEnd: aIdx) < 0 ifTrue: [ ^nil ].
70 's=' print. s print. '; e=' print. e printNl.
71 ^mstr from: s+1 to: e.