|
@@ -35,8 +35,6 @@
|
|
public function match( s : String ) : Bool {
|
|
public function match( s : String ) : Bool {
|
|
r.m = r.exec(s);
|
|
r.m = r.exec(s);
|
|
r.s = s;
|
|
r.s = s;
|
|
- r.l = untyped __js__("RegExp.leftContext");
|
|
|
|
- r.r = untyped __js__("RegExp.rightContext");
|
|
|
|
return (r.m != null);
|
|
return (r.m != null);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -46,17 +44,13 @@
|
|
|
|
|
|
public function matchedLeft() : String {
|
|
public function matchedLeft() : String {
|
|
if( r.m == null ) throw "No string matched";
|
|
if( r.m == null ) throw "No string matched";
|
|
- if( r.l == null ) return r.s.substr(0,r.m.index);
|
|
|
|
- return r.l;
|
|
|
|
|
|
+ return r.s.substr(0,r.m.index);
|
|
}
|
|
}
|
|
|
|
|
|
public function matchedRight() : String {
|
|
public function matchedRight() : String {
|
|
if( r.m == null ) throw "No string matched";
|
|
if( r.m == null ) throw "No string matched";
|
|
- if( r.r == null ) {
|
|
|
|
- var sz = r.m.index+r.m[0].length;
|
|
|
|
- return r.s.substr(sz,r.s.length-sz);
|
|
|
|
- }
|
|
|
|
- return r.r;
|
|
|
|
|
|
+ var sz = r.m.index+r.m[0].length;
|
|
|
|
+ return r.s.substr(sz,r.s.length-sz);
|
|
}
|
|
}
|
|
|
|
|
|
public function matchedPos() : { pos : Int, len : Int } {
|
|
public function matchedPos() : { pos : Int, len : Int } {
|