How to get json from a string?

fantaghiro

I have this string:

"var block = new MatchesBlock('page_competition_1_block_competition_matches_summary_5', 'block_competition_matches_summary', {"page":0,"bookmaker_urls":{"13":[{"link":"http:\/\/www.bet365.com\/home\/?affiliate=365_178981","name":"Bet 365"}]},"block_service_id":"competition_summary_block_competitionmatchessummary","round_id":42011,"outgroup":false,"view":2,"competition_id":13});"

I want get:

{"page":0,"bookmaker_urls":{"13":[{"link":"http:\/\/www.bet365.com\/home\/?affiliate=365_178981","name":"Bet 365"}]},"block_service_id":"competition_summary_block_competitionmatchessummary","round_id":42011,"outgroup":false,"view":2,"competition_id":13}

so I write:

MatchesBlock\(([^)]+)\)

but this will take all the string inside MatchesBlock

Pedro Lobito

For the example provided, you can use:

{[^)]+

enter image description here

Demo

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get the JSON STRING from the given string

From Dev

How to get a string[] from the following JSON string?

From Dev

How to get json string from the url?

From Dev

How to Get String from Json Array

From Dev

How to get JSON string from URL with Javascript?

From Dev

How to get each value from JSON string

From Dev

How to get JSON string from URL with Javascript?

From Dev

How to get a specific value from a JSON string

From Dev

how to get the json format from the encoded string

From Dev

How to get string based on id from json

From Dev

How to get String Array from JSON Object

From Dev

Json-cpp - how to initialize from string and get string value?

From Dev

How to get value from a string which is formatted as JSON string?

From Dev

how to get specific object value inside jquery from json string

From Dev

How to get values from nested json string by jquery?

From Dev

How to get all string from json document in jsoniq or javascript?

From Dev

How to get String value from json_decode in php

From Dev

How to Get value of filed "cat2" from the json string

From Dev

How to get some values from a JSON string in C#?

From Dev

How to get values from string and represent it as json object in javascript

From Dev

How to get values from this JSON String in Objective C, iPhone

From Dev

How do i decode and get string values from json

From Dev

how to use multiple lines of json string from $.get()

From Dev

How to Get Values from a json response string in C#

From Dev

How to get a String from HTTP and use it to build a JSON Object?

From Dev

How do I get String value from JSON?

From Dev

how to get json string from angular $http post request

From Dev

How do I get the country from this JSON string?

From Dev

how to get specific object value inside jquery from json string

Related Related

  1. 1

    How to get the JSON STRING from the given string

  2. 2

    How to get a string[] from the following JSON string?

  3. 3

    How to get json string from the url?

  4. 4

    How to Get String from Json Array

  5. 5

    How to get JSON string from URL with Javascript?

  6. 6

    How to get each value from JSON string

  7. 7

    How to get JSON string from URL with Javascript?

  8. 8

    How to get a specific value from a JSON string

  9. 9

    how to get the json format from the encoded string

  10. 10

    How to get string based on id from json

  11. 11

    How to get String Array from JSON Object

  12. 12

    Json-cpp - how to initialize from string and get string value?

  13. 13

    How to get value from a string which is formatted as JSON string?

  14. 14

    how to get specific object value inside jquery from json string

  15. 15

    How to get values from nested json string by jquery?

  16. 16

    How to get all string from json document in jsoniq or javascript?

  17. 17

    How to get String value from json_decode in php

  18. 18

    How to Get value of filed "cat2" from the json string

  19. 19

    How to get some values from a JSON string in C#?

  20. 20

    How to get values from string and represent it as json object in javascript

  21. 21

    How to get values from this JSON String in Objective C, iPhone

  22. 22

    How do i decode and get string values from json

  23. 23

    how to use multiple lines of json string from $.get()

  24. 24

    How to Get Values from a json response string in C#

  25. 25

    How to get a String from HTTP and use it to build a JSON Object?

  26. 26

    How do I get String value from JSON?

  27. 27

    how to get json string from angular $http post request

  28. 28

    How do I get the country from this JSON string?

  29. 29

    how to get specific object value inside jquery from json string

HotTag

Archive