Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2023-09-04 10:51
Flavor·PCRE (Legacy)

/
(?<=\G(?!^)|\@apply) ([^\s\;]*|[\p{P}]*)
/
gm
Open regex in editor

Description

Or any other particular case where given any line that starts with the pattern "@apply" (or any other line heading) and it substitutes any word (list of characters without spaces), with or without puntuation in them, and it adds a custom prefix to all the words in that line but the line heading.

Submitted by @drakopablo.dev