Community Patterns

Community Library Entry

1

Regular Expression
Created·2024-06-17 17:22
Flavor·PCRE2 (PHP)

/
^RUN (.*?(?<! \\)$)
/
gms
Open regex in editor

Description

This will match the first RUN statement in a Dockerfile and capture all lines in that RUN statement (including those where the line continuation operator '' is used on the previous line.)

Submitted by Russ Frizzell-Carlton