Last active
October 11, 2017 07:11
-
-
Save worp1900/4d40219119294b5a111396834dc77a0c to your computer and use it in GitHub Desktop.
Helpful regular expressions (pcre) I often use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?<![\S"])([^"\s]+)(?![\S"]) | |
Find all strings not enclosed in quotes. Workx ok well. Often used to add quotes to JSON notation that doesn't have it yet. Currently doesn't detect brackets like [, [, }. That needs some fixing. | |
Source: https://stackoverflow.com/questions/11324749/a-regex-to-detect-string-not-enclosed-in-double-quotes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not yet well working. Wanting to use it to wrap JSON structures in correct quotes.
Example:
Should be this: