Regular Expressions 101

Library entries

Shortcode parser

Vote

3

Regular Expression
pcre

/
(?P<shortcode>(?:(?:\s?\[))(?P<name>[\w\-]{3,})(?:\s(?P<attrs>[\w\d,\s=\"\'\-\+\#\%\!\~\`\&\.\s\:\/\?\|]+))?(?:\])(?:(?P<html>[\w\d\,\!\@\#\$\%\^\&\*\(\\)\s\=\"\'\-\+\&\.\s\:\/\?\|\<\>]+)(?:\[\/[\w\-\_]+\]))?)
/
ug

Description

Loading markdown...
Submitted by anonymous - 6 years ago