RegExp.lastParen
syntax: |
RegExp.lastParen |
description: |
This property has the text matched by the last group, parenthesized sub pattern, in the last pattern search. RegExp.lastParen is equivalent to RegExp["$+"], for compatibility with PERL.
Read-only property.
|
see: |
|
example: |
var str = "one two three two one"; var pat = /(t.o)+\s(t.r)/ pat.exec(str); // RegExp.lastParen == "thr" |