Regular Expressions 101

Adds custom prefix to tailwind classes

Open Workspace
  • PCRE (Legacy)
  • Substitution
1

Regular Expression

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

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