Regular Expressions 101

Library entries

Parse string like: "[!type|name] http://some.url/to.file"

Vote

2

Regular Expression
javascript

/
(\s*\[+?\s*(\!?)\s*([a-z]*)\s*\|?\s*([a-z0-9\.\-_]*)\s*\]+?)?\s*([^\s]+)\s*
/
ig

Description

Loading markdown...
Submitted by Max Chuhryaev - 6 years ago