Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-09-24 14:03
Flavor·PCRE2 (PHP)

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

Description

regex that wrap the Panel section with <div class="panel">$&</div> so it will display like a webcomic

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

Submitted by anonymous