in reply to Re^2: PCRE: Repeating Subpattens After Intervening Characters
in thread PCRE: Repeating Subpattens After Intervening Characters
Wow, you guys are amazingly quick to reply and helpful in those replies. That said, since I need to do this outside of Perl, in a pure PCRE expression, neither this nor ikegami's post is helpful.
I disagree. We didn't use anything Perl-specific. For example, here it is in JScript:
var pat = "\\d\\s+foo"; var regexp = "(" + pat + ")[^\r\n]*(" + pat + ")"; var re = new RegExp(regexp); re.exec(some_string);
(Untested)
|
|---|