backreferences in PCRE?

Alex Rice alex at mindlube.com
Fri Nov 14 17:28:36 EST 2003


On Nov 13, 2003, at 3:10 PM, Dave Cragg wrote:
> Alex, it seems you can't backreference in the replacement expression 
> as in Perl, but you can in the "find" expression, using "\1", "\2", 
> etc.

OK

> In Perl, I don't think the $1, $2, etc. in the replacement expression 
> are strictly regular expression  elements. They are really special 
> Perl variables. For example, you can use $1 at anytime after a match 
> and it will still hold the matched value.. However, it would be nice 
> to have this ability in Rev, but I don't think $1, etc, would work as 
> it would clash with Rev's environment variables.

Yep I think you are right.

Thanks,

Alex Rice <alex at mindlube.com> | Mindlube Software | 
<http://mindlube.com>

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco



More information about the use-livecode mailing list