Community Patterns

Community Library Entry

1

Regular Expression
Created·2023-09-11 06:28
Flavor·PCRE2 (PHP)

~
[^<>](?![^<]*>|[^<>]*<\/)(?!\s\#\s)(\#\S[^<>](?![^<]*>|[^<>]*<\/)(.*?)\S\#)
~
mUg
Open regex in editor

Description

Finds all occurence in a plain text / html text where a text is between 2 hashtags : #text#

Submitted by Kervan Mazuy