An Introduction to Regular Expressions The Basics 23 of 50 : [PREV] [NEXT]

Standard Meta Characters

Backreferences (continued)

Perl also supports several other backreference variables:

$` returns everything before the matched string.
$' returns everything after the matched string.
$+ returns whatever the last bracket match matched.
$& returns the entire matched string.

PLEASE NOTE THESE ARE BAD IF YOU WANT EFFICIENCY


© 2003 Barbie barbie@missbarbell.co.uk Home http://birmingham.pm.org/