Regular Expressions 101

Escape unescaped % for cron command line

Open Workspace
  • PCRE2 (PHP)
  • Substitution
1

Regular Expression

/
\\[\\%](*SKIP)(*FAIL)|%
/
gm

Description

Escape % that is not followed by unescaped . Regex is usefull for escaping cron command string.

Submitted by Anonymous