kyleabaker
12 years agoVisitor
JSON and Regex Escape Characters
I'm parsing a JSON response and am finding that some year strings are returned with the following format in JSON:
...,"Year":"2009\u2013",...
When I set year = Content.Year I'd like to replace the \u with a dash (ex. 2009-2013), but its showing up as "2009-" currently and I'm not able to even see the second year. I see that \u appears to be an escape character. Any idea how I can get this date range formatted correctly?
...,"Year":"2009\u2013",...
When I set year = Content.Year I'd like to replace the \u with a dash (ex. 2009-2013), but its showing up as "2009-" currently and I'm not able to even see the second year. I see that \u appears to be an escape character. Any idea how I can get this date range formatted correctly?