Regex For Square Brackets with Quotes

时间:2016-07-11 19:39:59

标签: regex

I am looking to extract all the entries from the following string:

[
"GUID_ID_ONE",
"2016-07-11T18:35:29Z",
"email@address.com",
"HASH_STRING",
"GUID_KEY_TWO",
"GUID_KEY_THREE"
]

I would like a RegEx to extract all the strings, quotes omitted. I have used

   "(.*?)" 

but this would appear to only find the first string.

1 个答案:

答案 0 :(得分:1)

Depending on the language you're using, the implementation can be different but you need to use the global modifier(g) to get all the matching strings, like this :

/"(.*?)"/g

Check here