Regular Expressions 101

Break PANEL webcomic

Open Workspace
  • PCRE2 (PHP)
  • Substitution
1

Regular Expression

/
^(PANEL\s+\S+)(.*?)(?=PANEL|\Z)
/
gms

Description

regex that wrap the Panel section with $& so it will display like a webcomic

codepen link: https://codepen.io/mangadrawing123/pen/oNwavgQ?editors=0110

Submitted by Anonymous