Regular Expressions 101

Library entries

Parse JSON key value

Vote

1

Regular Expression
pcre

/
(?:\"|\')(?<key>[\w\d]+)(?:\"|\')(?:\:\s*)(?:\"|\')?(?<value>[\w\s-]*)(?:\"|\')?
/
gm

Description

Loading markdown...
Submitted by Kostas Trichas - 7 years ago