Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
\[(\[?)(?P<shortcodename>\w\S+)(?![/w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*(?:\[(?!\/\2\])[^\[]*)*)\[\/\2\])?)(\[?)
"
g

Description

Made up from wordpress shortcake php

Submitted by Nick Moreton - 3 years ago