Back Referencing

Back Referencing


Back Referencing is capturing what was previously matched and referencing it.

CREATED 2016-05-04 16:00:01.0

00-24-DF

UPDATED 2016-05-04 16:00:13.0

Parenthesis


Another use of parenthesis is back referencing. Whenever parenthesis are used the regex engine puts any value derived within parenthesis into a variable. The variables are numbered from the very left parenthesis starting with one 1 to the very right being n.

How they are referenced is platform specific. egrep uses a slash i.e. /1 while perl uses a $ i.e. $1.

CREATED 2016-05-02 14:02:05.0

00-24-DE

UPDATED 2016-05-04 16:00:14.0

Knowledge

L
I
N
K
S

DBID: db.wam

Page Server: Ruger

©2012 Leistware Data Systems

      Hello anonymous