Since this is a class property (a static property), it belongs to the global built-in RegExp object. This means it is shared by all RegExp object instances and therefore is very transient and will be overwritten as soon as the next regular expression is evaluated. If you want to preserve the value, you will need to copy it immediately after your regular expression has been evaluated and before you call another.
See also: | RegExp.exec(), RegExp.test(), RegExp["$`"] |
Prev | Home | Next |
RegExp.lastParen | Up | RegExp.multiline |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |