Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section contains information on how special capture group references are managed.

...

source valuereplace transformreplacement
foobar
Code Block
replace col:MyColumn with:'$$f' on:'f'
$foobar
foobar
Code Block
replace col:MyColumn with:'$2' on:`(f)(o)(o)bar`

Note that the on parameter is a

D s item
itempattern
rtrue
.

o

 

Positive and Negative Lookaheads

In regular expressions, you can use positive and negative lookahead capture groups to capture content that is conditionally followed or not followed by a specified capture group.

TypeExample expression 
Positive lookahead
Code Block
/q(?u)/
Capture the letter q only when it is followed by the letter u. Letter u is not captured.
Negative lookahead
Code Block
/q(?!u)/
Capture the letter q when it is not followed by the letter u. Letter u is not captured.